[−][src]Struct sdlang::Attribute
A value with an associated name, forming a single attribute.
Multiple attributes may be placed on tags.
Conversion functions are providing for parsing and for converting to and
from a (String, Value)
tuple (useful for collecting a set of attributes
into a hash map).
Fields
name: String
The name of the attribute.
value: Value
The associated value.
Methods
impl Attribute
[src]
Trait Implementations
impl PartialEq<Attribute> for Attribute
[src]
impl From<(String, Value)> for Attribute
[src]
fn from((k, v): (String, Value)) -> Self
[src]
Converts from a key-value tuple.
Useful when converting from an iterator of key-value pairs (which may
originate from HashMap::iter()
).
impl From<Attribute> for (String, Value)
[src]
fn from(attr: Attribute) -> Self
[src]
Converts into a key-value tuple.
Useful when converting into an iterator of key-value pairs (which may
be collected into a HashMap
).
impl Display for Attribute
[src]
impl Debug for Attribute
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the same way as fmt::Display
. Useful for non-excessive debug
output.
impl FromStr for Attribute
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,