Enum impl_tools_lib::ScopeItem
source · [−]pub enum ScopeItem {
Enum {
token: Enum,
brace: Brace,
variants: Punctuated<Variant, Comma>,
},
Struct {
token: Struct,
fields: Fields,
},
Type {
token: Type,
eq_token: Eq,
ty: Box<Type>,
},
Union {
token: Union,
fields: FieldsNamed,
},
}Expand description
Content of items supported by Scope that are not common to all variants
Variants
Enum
A syn::ItemEnum, minus common parts
Struct
A syn::ItemStruct, minus common parts
Uses custom Fields, supporting field initializers.
Type
A syn::ItemType, minus common parts
Union
A syn::ItemUnion, minus common parts
Implementations
sourceimpl ScopeItem
impl ScopeItem
sourcepub fn token_span(&self) -> Span
pub fn token_span(&self) -> Span
Take span of enum/struct/type/union token
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ScopeItem
impl !Send for ScopeItem
impl !Sync for ScopeItem
impl Unpin for ScopeItem
impl UnwindSafe for ScopeItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more