pub struct ErrorVariant {
pub name: String,
pub message_template: Option<String>,
pub fields: Vec<FieldDef>,
pub has_source: bool,
pub has_from: bool,
pub is_unit: bool,
pub doc: String,
}Expand description
An error variant.
Fields§
§name: String§message_template: Option<String>The #[error("...")] message template string, e.g. "I/O error: {0}".
fields: Vec<FieldDef>Fields on this variant (struct or tuple fields).
has_source: boolTrue if any field has #[source] or #[from].
has_from: boolTrue if any field has #[from] (auto From conversion).
is_unit: boolTrue if this is a unit variant (no fields).
doc: StringTrait Implementations§
Source§impl Clone for ErrorVariant
impl Clone for ErrorVariant
Source§fn clone(&self) -> ErrorVariant
fn clone(&self) -> ErrorVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorVariant
impl Debug for ErrorVariant
Source§impl<'de> Deserialize<'de> for ErrorVariant
impl<'de> Deserialize<'de> for ErrorVariant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ErrorVariant
impl RefUnwindSafe for ErrorVariant
impl Send for ErrorVariant
impl Sync for ErrorVariant
impl Unpin for ErrorVariant
impl UnsafeUnpin for ErrorVariant
impl UnwindSafe for ErrorVariant
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