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: VisibilityField 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: TypeField type
In case the type is omitted, this has value Type::Infer.
assignment: Option<(Eq, Expr)>Optional non-default value assignment