pub enum Error {
Show 22 variants
Io(Error),
Config(String),
Validation(String),
Template(String),
Update(String),
Standards(String),
Cli(String),
Process(String),
Serialization(Error),
Toml(Error),
Network(String),
Version(Error),
Parse(String),
RustNotFound(String),
Command(String),
FileNotFound(String),
RateLimited(u64),
Migration(String),
Regex(Error),
Utf8(Utf8Error),
Safety(String),
SafetyBlocked(String),
}Expand description
Ferrous Forge specific errors
Variants§
Io(Error)
IO errors (file operations, etc.)
Config(String)
Configuration errors
Validation(String)
Validation errors
Template(String)
Template errors
Update(String)
Update system errors
Standards(String)
Standards enforcement errors
Cli(String)
CLI argument errors
Process(String)
External process errors
Serialization(Error)
Serialization errors
Toml(Error)
TOML parsing errors
Network(String)
Network/HTTP errors
Version(Error)
Semver parsing errors
Parse(String)
Parse errors
RustNotFound(String)
Rust not found
Command(String)
Command execution error
FileNotFound(String)
File not found
RateLimited(u64)
Rate limited
Migration(String)
Migration error
Regex(Error)
Regex error
Utf8(Utf8Error)
UTF-8 conversion error
Safety(String)
Safety pipeline error
SafetyBlocked(String)
Safety pipeline blocked operation
Implementations§
Source§impl Error
impl Error
Sourcepub fn config(msg: impl Into<String>) -> Self
pub fn config(msg: impl Into<String>) -> Self
Create a new configuration error
§Examples
let err = Error::config("missing config key");
assert!(err.to_string().contains("missing config key"));Sourcepub fn validation(msg: impl Into<String>) -> Self
pub fn validation(msg: impl Into<String>) -> Self
Create a new validation error
§Examples
let err = Error::validation("invalid field value");
assert!(err.to_string().contains("invalid field value"));Sourcepub fn process(msg: impl Into<String>) -> Self
pub fn process(msg: impl Into<String>) -> Self
Create a new process error
§Examples
let err = Error::process("cargo build failed");
assert!(err.to_string().contains("cargo build failed"));Sourcepub fn rust_not_found(msg: impl Into<String>) -> Self
pub fn rust_not_found(msg: impl Into<String>) -> Self
Create a new rust not found error
Sourcepub fn file_not_found(msg: impl Into<String>) -> Self
pub fn file_not_found(msg: impl Into<String>) -> Self
Create a new file not found error
Sourcepub fn rate_limited(retry_after: u64) -> Self
pub fn rate_limited(retry_after: u64) -> Self
Create a new rate limited error
Sourcepub fn safety_blocked(msg: impl Into<String>) -> Self
pub fn safety_blocked(msg: impl Into<String>) -> Self
Create a new safety blocked error
Sourcepub fn tool_not_found(tool: impl Into<String>) -> Self
pub fn tool_not_found(tool: impl Into<String>) -> Self
Create a new tool not found error
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.