#[non_exhaustive]pub enum GenerateError {
ReadDar {
path: PathBuf,
source: DarError,
},
DecodeDar {
path: PathBuf,
source: DecodeError,
},
EmptyDar {
path: PathBuf,
},
InvalidCrateName {
name: String,
},
InvalidCrateVersion {
version: String,
},
InvalidRuntimeRequirement {
requirement: String,
},
WouldClobber {
path: PathBuf,
},
Codegen(CodegenError),
Write {
path: PathBuf,
source: Error,
},
}Expand description
Writing a bindings crate failed.
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.
ReadDar
The .dar could not be read.
Fields
DecodeDar
The .dar could not be decoded.
Fields
§
source: DecodeErrorThe underlying decode error.
EmptyDar
The archive held no Daml-LF packages to generate from.
InvalidCrateName
The requested crate name is not a valid Cargo package name.
InvalidCrateVersion
The DAR’s package version is not usable as a Cargo version.
It is refused rather than sanitised because the version reaches the
generated Cargo.toml, and a DAR is not necessarily something the
caller wrote.
InvalidRuntimeRequirement
The canton-daml version requirement is not one Cargo can parse.
WouldClobber
An output file exists and was not written by this tool.
Codegen(CodegenError)
The generated tokens were not valid Rust — a bug in this crate.
Write
Writing the output crate failed.
Trait Implementations§
Source§impl Debug for GenerateError
impl Debug for GenerateError
Source§impl Display for GenerateError
impl Display for GenerateError
Source§impl Error for GenerateError
impl Error for GenerateError
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<CodegenError> for GenerateError
impl From<CodegenError> for GenerateError
Source§fn from(source: CodegenError) -> Self
fn from(source: CodegenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for GenerateError
impl !UnwindSafe for GenerateError
impl Freeze for GenerateError
impl Send for GenerateError
impl Sync for GenerateError
impl Unpin for GenerateError
impl UnsafeUnpin for GenerateError
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