pub struct Definitions {
pub version: Version,
pub types: Vec<Node>,
pub tokens: BTreeMap<String, String>,
}
Expand description
Top-level content of the syntax tree description.
Fields§
§version: Version
The Syn version whose syntax tree is described by this data.
types: Vec<Node>
Syntax tree types defined by Syn.
tokens: BTreeMap<String, String>
Token types defined by Syn (keywords as well as punctuation).
The keys in the map are the Rust type name for the token. The values in the map are the printed token representation.
These tokens are accessible in the Syn public API as syn::token::#name
or alternatively syn::Token![#repr]
.
Trait Implementations§
Source§impl Clone for Definitions
impl Clone for Definitions
Source§fn clone(&self) -> Definitions
fn clone(&self) -> Definitions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Definitions
impl Debug for Definitions
Source§impl<'de> Deserialize<'de> for Definitions
impl<'de> Deserialize<'de> for Definitions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Definitions
impl PartialEq for Definitions
Source§impl Serialize for Definitions
impl Serialize for Definitions
impl StructuralPartialEq for Definitions
Auto Trait Implementations§
impl Freeze for Definitions
impl RefUnwindSafe for Definitions
impl Send for Definitions
impl Sync for Definitions
impl Unpin for Definitions
impl UnwindSafe for Definitions
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