pub struct Parameter {
pub name: String,
pub ty: ParameterType,
}Expand description
A single name:Type parameter inside a TL definition.
Fields§
§name: StringThe parameter name as it appears in the TL schema.
ty: ParameterTypeThe resolved type of this parameter.
Trait Implementations§
Source§impl FromStr for Parameter
impl FromStr for Parameter
Source§fn from_str(token: &str) -> Result<Self, Self::Err>
fn from_str(token: &str) -> Result<Self, Self::Err>
Parses a single parameter token such as flags:#, id:long, or
photo:flags.0?InputPhoto.
Returns Err(ParamParseError::TypeDef { name }) for the special
{X:Type} generic-parameter-definition syntax so callers can handle it
without the overhead of ?.
Source§type Err = ParamParseError
type Err = ParamParseError
The associated error which can be returned from parsing.
impl Eq for Parameter
impl StructuralPartialEq for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnsafeUnpin for Parameter
impl UnwindSafe for Parameter
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