Skip to main content

fidl_next_protocol/
framework_error.rs

1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use core::error::Error;
6use core::fmt;
7
8/// An internal framework error.
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10#[repr(i32)]
11pub enum FrameworkError {
12    /// The protocol method was not recognized by the receiver.
13    UnknownMethod = -2,
14}
15
16impl fmt::Display for FrameworkError {
17    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18        match self {
19            Self::UnknownMethod => write!(f, "unknown method"),
20        }
21    }
22}
23
24impl Error for FrameworkError {}