pub struct StructToken {
pub attrs: HashMap<String, AttrToken>,
pub visibility: Option<TokenTree>,
pub name: TokenTree,
pub fields: Vec<FieldToken>,
pub generics: Option<GenericParams>,
}
Expand description
Strung token that allow to
decode a struct
block.
Defined as described in https://doc.rust-lang.org/stable/reference/items/structs.html
Fields§
§attrs: HashMap<String, AttrToken>
§visibility: Option<TokenTree>
§name: TokenTree
§fields: Vec<FieldToken>
§generics: Option<GenericParams>
Trait Implementations§
Source§impl Debug for StructToken
impl Debug for StructToken
Source§impl Default for StructToken
impl Default for StructToken
Source§impl Display for StructToken
impl Display for StructToken
Source§impl From<StructToken> for TopLevelNode
impl From<StructToken> for TopLevelNode
Source§fn from(value: StructToken) -> Self
fn from(value: StructToken) -> Self
Converts to this type from the input type.
Source§impl TopLevelAST for StructToken
impl TopLevelAST for StructToken
Source§impl TryFrom<&TokenStream> for StructToken
impl TryFrom<&TokenStream> for StructToken
Source§type Error = KParserError
type Error = KParserError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for StructToken
impl RefUnwindSafe for StructToken
impl !Send for StructToken
impl !Sync for StructToken
impl Unpin for StructToken
impl UnwindSafe for StructToken
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