pub enum BuildError {
Parse {
file: String,
line: u32,
col: u32,
message: String,
},
Codegen {
message: String,
},
Io(Error),
}Expand description
Rich error type for .proto compilation operations.
Carries structured location information where available so that IDEs and build-script consumers can point the user directly to the offending source position.
Variants§
Parse
A .proto file has a syntax error with location information.
Fields
Codegen
Code generation failed.
Io(Error)
An I/O error occurred (e.g. reading a .proto file or writing output).
Trait Implementations§
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
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<BuildError> for OxiProtoError
impl From<BuildError> for OxiProtoError
Source§fn from(e: BuildError) -> Self
fn from(e: BuildError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for BuildError
impl From<Error> for BuildError
Source§impl From<OxiProtoError> for BuildError
impl From<OxiProtoError> for BuildError
Source§fn from(e: OxiProtoError) -> Self
fn from(e: OxiProtoError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BuildError
impl !UnwindSafe for BuildError
impl Freeze for BuildError
impl Send for BuildError
impl Sync for BuildError
impl Unpin for BuildError
impl UnsafeUnpin for BuildError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more