#[non_exhaustive]pub enum Error {
MissingDescriptorBinding,
ConflictingDescriptorBindings,
MissingOutDir,
DescriptorTool {
tool: &'static str,
source: Error,
},
DescriptorToolFailed {
tool: &'static str,
status: ExitStatus,
stderr: String,
},
DecodeFileDescriptorSet(DecodeError),
BufWithIncludes,
BuffaBuild(String),
Io(Error),
}Expand description
Errors raised by Builder::compile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingDescriptorBinding
Neither Builder::descriptor_pool nor
Builder::file_descriptor_set_bytes was supplied.
ConflictingDescriptorBindings
Both bindings were supplied; the macro accepts at most one.
MissingOutDir
OUT_DIR was not set by cargo and no explicit
Builder::out_dir was given.
DescriptorTool
Spawning the descriptor-producing tool (protoc/buf) failed.
DescriptorToolFailed
The descriptor-producing tool returned a non-zero exit status.
Fields
status: ExitStatusExit status returned by the tool.
DecodeFileDescriptorSet(DecodeError)
The descriptor-set bytes could not be parsed.
BufWithIncludes
Buf mode resolves imports through buf.yaml/buf.work.yaml and
has no use for protoc-style .includes(..). Configuring both is
almost always a bug, so we error rather than silently dropping the
include list.
BuffaBuild(String)
buffa-build reported an error.
buffa-build’s compile() returns a Box<dyn Error> (without
Send + Sync), so we capture its rendered message and surface it
here as a string. The original error chain is unfortunately lost on
the buffa-build side; if more structured failure data is needed
we can lift it from a future buffa-build release.
Io(Error)
I/O error while reading or writing artifacts.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()