pub enum Error {
DuplicateRights(String),
InvalidArgs(String),
Io(Error),
FidlEncoding(Error),
MissingRights(String),
Parse {
err: String,
location: Option<Location>,
filename: Option<String>,
},
Validate {
err: String,
filename: Option<String>,
},
FidlValidator {
errs: ErrorList,
},
Internal(String),
Utf8(Utf8Error),
RestrictedFeature(String),
}
Expand description
Enum type that can represent any error encountered by a cml operation.
Variants§
DuplicateRights(String)
InvalidArgs(String)
Io(Error)
FidlEncoding(Error)
MissingRights(String)
Parse
Validate
FidlValidator
Internal(String)
Utf8(Utf8Error)
RestrictedFeature(String)
A restricted feature was used without opting-in.
Implementations§
Source§impl Error
impl Error
pub fn invalid_args(err: impl Into<String>) -> Self
pub fn parse( err: impl Display, location: Option<Location>, filename: Option<&Path>, ) -> Self
pub fn validate(err: impl Display) -> Self
pub fn fidl_validator(errs: ErrorList) -> Self
pub fn duplicate_rights(err: impl Into<String>) -> Self
pub fn missing_rights(err: impl Into<String>) -> Self
pub fn internal(err: impl Into<String>) -> Self
pub fn json5(err: Error, file: Option<&Path>) -> Self
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more