Enum mattro::Value [−][src]
Expand description
Represents a value for a name-value
attribute.
Variants
Literal(Lit)
A literal value: #[attribute(name="value")]
.
An array of literal values: #[attribute(name=1,2,3,4)]
.
Implementations
Returns true
if this value is a literal.
Returns true
if this value is a string
or byte string
literal value.
Returns true
if this value is an integer
or byte
literal value.
Returns true
if this value is a numeric literal (integer or float).
Returns the String
representation of this value or None
if is not a string literal.
Returns the char
representation of this value or None
if is not a char literal.
Returns the bool
representation of this value or None
if is not a bool literal.
Returns the byte
representation of this value or None
if is not a byte literal.
Converts this value into a integer or None
if is not an integer literal.
Converts this value into a float or None
if is not a float literal.
Returns a reference to this value literal.
Parses this value into the given type.
Returns None
None
if the value is not a literal.None
if the parse fails.
Parses this value into a Vec<T>
Returns None
None
if the value is not an array literal.None
if the parse fails.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more