#[repr(u8)]pub enum Attr {
From = 0,
Source = 1,
}Expand description
Error attribute types for field configuration.
Variants§
From = 0
Marks a field as the error source and generates a From impl.
Usage: #[facet(error::from)]
This attribute:
- Marks the field as the source in
Error::source() - Generates a
From<FieldType> for ErrorTypeimplementation
Source = 1
Marks a field as the error source without generating a From impl.
Usage: #[facet(error::source)]
This attribute only marks the field as the source in Error::source().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attr
impl RefUnwindSafe for Attr
impl Send for Attr
impl Sync for Attr
impl Unpin for Attr
impl UnwindSafe for Attr
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