Enum amplify_syn::ArgValue [−][src]
Value for attribute or attribute argument, i.e. for #[attr = value]
and
#[attr(arg = value)]
this is the value
part of the attribute. Can be
either a single literal or a single valid rust type name
Variants
Literal(Lit)
Attribute value represented by a literal
Type(Type)
Attribute value represented by a type name
No value is given
Implementations
impl ArgValue
[src]
impl ArgValue
[src]pub fn literal_value(&self) -> Result<Lit, Error>
[src]
Returns literal value for ArgValue::Literal
variant or fails with
Error::ArgValueMustBeLiteral
otherwise
pub fn type_value(&self) -> Result<Type, Error>
[src]
Returns type value for ArgValue::Type
variant or fails with
Error::ArgValueMustBeType
otherwise
pub fn is_none(&self) -> bool
[src]
Tests whether the self is set to ArgValue::None
pub fn is_some(&self) -> bool
[src]
Tests whether the self is not set to ArgValue::None
pub fn value_class(&self) -> Option<ValueClass>
[src]
Returns ValueClass
for the current value, if any
Trait Implementations
impl From<Option<LitByteStr>> for ArgValue
[src]
impl From<Option<LitByteStr>> for ArgValue
[src]fn from(val: Option<LitByteStr>) -> Self
[src]
impl ToTokens for ArgValue
[src]
impl ToTokens for ArgValue
[src]fn to_tokens(&self, tokens: &mut TokenStream)
[src]
pub fn to_token_stream(&self) -> TokenStream
[src]
pub fn into_token_stream(self) -> TokenStream
[src]
impl TryInto<LitByteStr> for ArgValue
[src]
impl TryInto<LitByteStr> for ArgValue
[src]impl TryInto<Option<LitByteStr>> for ArgValue
[src]
impl TryInto<Option<LitByteStr>> for ArgValue
[src]Auto Trait Implementations
impl RefUnwindSafe for ArgValue
impl RefUnwindSafe for ArgValue
impl UnwindSafe for ArgValue
impl UnwindSafe for ArgValue