pub struct DeclareField<Name, Value>(pub Name, pub Value);Expand description
Declares a single field within a struct. Renders as Name: Value.
Does not add attributes. If you want to use attributes for declaration purposes, you can use CanHaveAttributes::with_attributes on this field.
Tuple Fields§
§0: Name§1: ValueTrait Implementations§
Source§impl<Name, Value> CanHaveAttributes for DeclareField<Name, Value>
impl<Name, Value> CanHaveAttributes for DeclareField<Name, Value>
Source§fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
Adds attributes to this writable
Auto Trait Implementations§
impl<Name, Value> Freeze for DeclareField<Name, Value>
impl<Name, Value> RefUnwindSafe for DeclareField<Name, Value>where
Name: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Name, Value> Send for DeclareField<Name, Value>
impl<Name, Value> Sync for DeclareField<Name, Value>
impl<Name, Value> Unpin for DeclareField<Name, Value>
impl<Name, Value> UnwindSafe for DeclareField<Name, Value>where
Name: UnwindSafe,
Value: UnwindSafe,
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