pub struct Error { /* private fields */ }Expand description
Custom error type for the ggen project
Implementations§
Source§impl Error
impl Error
Sourcepub fn with_context(message: &str, context: &str) -> Self
pub fn with_context(message: &str, context: &str) -> Self
Create an error with additional context
Sourcepub fn with_source(
message: &str,
source: Box<dyn StdError + Send + Sync>,
) -> Self
pub fn with_source( message: &str, source: Box<dyn StdError + Send + Sync>, ) -> Self
Create an error with a source error
Source§impl Error
impl Error
Sourcepub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
Create an invalid input error
Sourcepub fn network_error(message: impl Into<String>) -> Self
pub fn network_error(message: impl Into<String>) -> Self
Create a network error
Sourcepub fn feature_not_enabled(feature: &str, help: &str) -> Self
pub fn feature_not_enabled(feature: &str, help: &str) -> Self
Create a feature not enabled error
Sourcepub fn file_not_found(path: PathBuf) -> Self
pub fn file_not_found(path: PathBuf) -> Self
Create a file not found error
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Create an internal error
Sourcepub fn invalid_state(message: impl Into<String>) -> Self
pub fn invalid_state(message: impl Into<String>) -> Self
Create an invalid state error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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<ConfigError> for Error
impl From<ConfigError> for Error
Source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for Error
impl<T> From<PoisonError<T>> for Error
Source§fn from(err: PoisonError<T>) -> Self
fn from(err: PoisonError<T>) -> Self
Converts to this type from the input type.
Source§impl From<QueryEvaluationError> for Error
impl From<QueryEvaluationError> for Error
Source§fn from(err: QueryEvaluationError) -> Self
fn from(err: QueryEvaluationError) -> Self
Converts to this type from the input type.
Source§impl From<SerializerError> for Error
impl From<SerializerError> for Error
Source§fn from(err: SerializerError) -> Self
fn from(err: SerializerError) -> Self
Converts to this type from the input type.
Source§impl From<SetLoggerError> for Error
impl From<SetLoggerError> for Error
Source§fn from(err: SetLoggerError) -> Self
fn from(err: SetLoggerError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for Error
impl From<StorageError> for Error
Source§fn from(err: StorageError) -> Self
fn from(err: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more