pub struct Arg { /* private fields */ }Expand description
Argument of a definition, such as $v or f in def foo($v; f): ....
Implementations§
source§impl Arg
impl Arg
sourcepub fn new_var(name: String) -> Self
pub fn new_var(name: String) -> Self
Create a variable argument with given name (without leading “$”).
sourcepub fn get_var(&self) -> Option<&str>
pub fn get_var(&self) -> Option<&str>
If the argument is a variable, return its name without leading “$”, otherwise None.
sourcepub fn get_nonvar(&self) -> Option<&str>
pub fn get_nonvar(&self) -> Option<&str>
If the argument is not a variable, return its name, otherwise None.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Arg
impl<'de> Deserialize<'de> for Arg
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