pub struct GreenticError {
pub code: ErrorCode,
pub message: String,
/* private fields */
}Expand description
Error type carrying a code and message.
Fields§
§code: ErrorCodeMachine-readable error code.
message: StringHuman-readable error message.
Implementations§
Source§impl GreenticError
impl GreenticError
Sourcepub fn new(code: ErrorCode, message: impl Into<String>) -> GreenticError
pub fn new(code: ErrorCode, message: impl Into<String>) -> GreenticError
Creates a new error with the provided code and message.
Sourcepub fn with_source<E>(self, source: E) -> GreenticError
pub fn with_source<E>(self, source: E) -> GreenticError
Attaches a source error to the GreenticError.
Trait Implementations§
Source§impl Debug for GreenticError
impl Debug for GreenticError
Source§impl<'de> Deserialize<'de> for GreenticError
impl<'de> Deserialize<'de> for GreenticError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GreenticError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GreenticError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for GreenticError
impl Display for GreenticError
Source§impl Error for GreenticError
impl Error for GreenticError
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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ComponentRange> for GreenticError
Available on crate feature time only.
impl From<ComponentRange> for GreenticError
Available on crate feature
time only.Source§fn from(err: ComponentRange) -> GreenticError
fn from(err: ComponentRange) -> GreenticError
Converts to this type from the input type.
Source§impl From<Parse> for GreenticError
Available on crate feature time only.
impl From<Parse> for GreenticError
Available on crate feature
time only.Source§fn from(err: Parse) -> GreenticError
fn from(err: Parse) -> GreenticError
Converts to this type from the input type.
Source§impl Serialize for GreenticError
impl Serialize for GreenticError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GreenticError
impl !RefUnwindSafe for GreenticError
impl Send for GreenticError
impl Sync for GreenticError
impl Unpin for GreenticError
impl !UnwindSafe for GreenticError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more