#[non_exhaustive]pub enum Error {
Io {
path: Option<PathBuf>,
source: Error,
},
MissingOutDir,
NoProtoFiles(PathBuf),
SymlinkRefused(PathBuf),
InvalidIncludeFile(PathBuf),
Protox(Error),
Prost(Error),
Pbjson(Error),
}Expand description
Error returned when discovering or compiling witforge-generated .proto files fails.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
Failed to read a directory or file or write generated output.
Fields
MissingOutDir
OUT_DIR was neither configured via Config::out_dir nor present in the environment.
NoProtoFiles(PathBuf)
No .proto files were found under the given directory.
SymlinkRefused(PathBuf)
Refused a symlink encountered as proto_dir or while walking proto_dir.
InvalidIncludeFile(PathBuf)
Configured include_file is not a single plain filename inside out_dir.
Protox(Error)
protox failed to compile the .proto files into a FileDescriptorSet.
Prost(Error)
prost-build failed to emit Rust source files from the compiled descriptors.
Pbjson(Error)
pbjson-build failed to emit proto3-JSON serde implementations.
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Errorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
*const ErrorKind is !null: Freeze,
PhantomData<ErrorKind>: Freeze,
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const ErrorKind is !null: UnsafeUnpin,
PhantomData<ErrorKind>: UnsafeUnpin,
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