#[repr(u8)]pub enum Attr {
Value(&'static str),
Func(&'static str),
Variant,
}Expand description
Default attribute types for configuring Default implementation.
Variants§
Value(&'static str)
Use a literal value for the field default (converted via .into()).
Usage: #[facet(default::value = "hello")]
Usage: #[facet(default::value = 42)]
Note: The type here is nominally &'static str but the plugin template
uses @attr_args which captures the raw tokens, so any value works.
Func(&'static str)
Call a function to get the default value.
Usage: #[facet(default::func = my_default_fn)]
Note: The type here is nominally &'static str but the plugin template
uses @attr_args which captures the raw tokens, so any path works.
Variant
Mark an enum variant as the default.
Usage: #[facet(default::variant)]
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