pub enum NewError {
InvalidCrateName {
name: String,
reason: &'static str,
},
InvalidGleamName {
name: String,
reason: &'static str,
},
InvalidBothNames {
name: String,
crate_reason: &'static str,
gleam_reason: &'static str,
},
TargetExists {
path: PathBuf,
},
Generation {
operation: &'static str,
path: PathBuf,
source: Error,
},
GenerationAndCleanup {
operation: &'static str,
path: PathBuf,
source: Error,
target: PathBuf,
cleanup: Error,
},
}Expand description
Typed refusal or generation failure from frame new.
Variants§
InvalidCrateName
The name fails the Rust crate identifier rule.
InvalidGleamName
The name fails the Gleam project-name rule.
InvalidBothNames
Both language naming rules reject the name.
Fields
TargetExists
The target is protected from replacement.
Generation
A named filesystem generation operation failed.
Fields
GenerationAndCleanup
Generation failed and atomic cleanup also failed.
Trait Implementations§
Source§impl Error for NewError
impl Error for NewError
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 NewError
impl !UnwindSafe for NewError
impl Freeze for NewError
impl Send for NewError
impl Sync for NewError
impl Unpin for NewError
impl UnsafeUnpin for NewError
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