pub enum Error {
FlatcErrorCode {
status_code: Option<i32>,
stdout: String,
stderr: String,
},
InvalidFlatcOutput(String),
UnsupportedFlatcVersion(String),
FlatcSpawnFailure(Error),
OutputDirNotSet,
}
Expand description
Primary error type returned when you compile your flatbuffer specifications to Rust.
Variants§
FlatcErrorCode
Returned when flatc
returns with an non-zero status code for a reason not covered
elsewhere in this enum.
Fields
InvalidFlatcOutput(String)
Returned if flatc --version
generates output we cannot parse. Usually means that the
binary requested is not, in fact, flatc.
UnsupportedFlatcVersion(String)
Returned if the version of flatc
does not match the supported version. Please refer to
SUPPORTED_FLATC_VERSION
for that.
FlatcSpawnFailure(Error)
Returned if we fail to spawn a process with flatc
. Usually means the supplied path to
flatc does not exist.
OutputDirNotSet
Returned if you failed to set either the output path or the OUT_DIR
environment variable.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
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