Struct grammers_tl_parser::tl::Definition [−][src]
pub struct Definition { pub namespace: Vec<String>, pub name: String, pub id: u32, pub params: Vec<Parameter>, pub ty: Type, pub category: Category, }
A Type Language definition.
Fields
namespace: Vec<String>
The namespace components of the definition. This list will be empty if the name of the definition belongs to the global namespace.
name: String
The name of this definition. Also known as “predicate” or “method”.
id: u32
The numeric identifier of this definition.
If a definition has an identifier, it overrides this value. Otherwise, the identifier is inferred from the definition.
params: Vec<Parameter>
A possibly-empty list of parameters this definition has.
ty: Type
The type to which this definition belongs to.
category: Category
The category to which this definition belongs to.
Trait Implementations
impl FromStr for Definition
[src]
impl FromStr for Definition
[src]type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(definition: &str) -> Result<Self, Self::Err>
[src]
Parses a Type Language definition.
Examples
use grammers_tl_parser::tl::Definition; assert!("sendMessage chat_id:int message:string = Message".parse::<Definition>().is_ok());
impl PartialEq<Definition> for Definition
[src]
impl PartialEq<Definition> for Definition
[src]fn eq(&self, other: &Definition) -> bool
[src]
fn ne(&self, other: &Definition) -> bool
[src]
impl StructuralPartialEq for Definition
[src]
impl StructuralPartialEq for Definition
[src]Auto Trait Implementations
impl RefUnwindSafe for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Send for Definition
impl Sync for Definition
impl Sync for Definition
impl Unpin for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
impl UnwindSafe for Definition