Struct impl_tools_lib::SingletonField
source · pub struct SingletonField {
pub attrs: Vec<Attribute>,
pub vis: Visibility,
pub ident: Option<Ident>,
pub colon_token: Option<Colon>,
pub ty: Type,
pub assignment: Option<(Eq, Expr)>,
}
Expand description
A field of a Singleton
Fields§
§attrs: Vec<Attribute>
Field attributes
vis: Visibility
Field visibility
ident: Option<Ident>
Field identifier (regular structs only, and optional even there)
colon_token: Option<Colon>
Separator between identifier and type
This is present only given an explicit identifier and an explicit type.
ty: Type
Field type
In case the type is omitted, this has value Type::Infer
.
assignment: Option<(Eq, Expr)>
Optional non-default value assignment
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SingletonField
impl !Send for SingletonField
impl !Sync for SingletonField
impl Unpin for SingletonField
impl UnwindSafe for SingletonField
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