pub struct Argument {
pub value: ArgumentValue,
pub span: Span,
pub raw: String,
}Expand description
Fields§
§value: ArgumentValueParsed argument value (see ArgumentValue for variants).
span: SpanSource span of this argument.
raw: StringOriginal source text including quotes (e.g. "hello", 80, $var).
Implementations§
Source§impl Argument
impl Argument
Sourcepub fn is_variable(&self) -> bool
pub fn is_variable(&self) -> bool
Check if this is a variable reference
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Check if this is a literal (unquoted, non-variable)
Sourcepub fn is_double_quoted(&self) -> bool
pub fn is_double_quoted(&self) -> bool
Check if this is a double-quoted string
Sourcepub fn is_single_quoted(&self) -> bool
pub fn is_single_quoted(&self) -> bool
Check if this is a single-quoted string
Trait Implementations§
Source§impl ArgumentExt for Argument
impl ArgumentExt for Argument
Source§impl<'de> Deserialize<'de> for Argument
impl<'de> Deserialize<'de> for Argument
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Argument, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Argument, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Argument
impl Serialize for Argument
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Argument
impl RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl UnsafeUnpin for Argument
impl UnwindSafe for Argument
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