Struct impl_tools_lib::Singleton 
source · pub struct Singleton {
    pub attrs: Vec<Attribute>,
    pub token: Struct,
    pub generics: Generics,
    pub style: StructStyle,
    pub fields: Punctuated<SingletonField, Comma>,
    pub impls: Vec<ItemImpl>,
}Expand description
A struct with a single instantiation
The singleton macro may be used to conveniently declare a struct’s type, implementations and construct an instance. This struct represents the macro’s input.
Fields§
§attrs: Vec<Attribute>Struct attributes
token: Structstruct token
generics: Generics(Explicit) struct generics
Note: the macro instantiated type may have extra generics.
style: StructStyleStruct style: unit/tuple/regular
fields: Punctuated<SingletonField, Comma>Struct fields
impls: Vec<ItemImpl>(Explicit) struct implementations
Implementations§
source§impl Singleton
 
impl Singleton
sourcepub fn into_scope(self) -> SingletonScope
 
pub fn into_scope(self) -> SingletonScope
Convert to a SingletonScope
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Singleton
impl !Send for Singleton
impl !Sync for Singleton
impl Unpin for Singleton
impl UnwindSafe for Singleton
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