Enum freya::prelude::TemplateAttribute
pub enum TemplateAttribute<'a> {
Static {
name: &'a str,
value: &'a str,
namespace: Option<&'a str>,
},
Dynamic {
id: usize,
},
}
Expand description
An attribute of the TemplateNode, created at compile time
Variants§
Static
Fields
§
name: &'a str
The name of this attribute.
For example, the href
attribute in href="https://example.com"
, would have the name “href”
This attribute is entirely known at compile time, enabling
Dynamic
The attribute in this position is actually determined dynamically at runtime
This is the index into the dynamic_attributes field on the container VNode
Trait Implementations§
§impl<'a> Debug for TemplateAttribute<'a>
impl<'a> Debug for TemplateAttribute<'a>
§impl<'de, 'a> Deserialize<'de> for TemplateAttribute<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for TemplateAttribute<'a>where 'de: 'a,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TemplateAttribute<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TemplateAttribute<'a>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<'a> Hash for TemplateAttribute<'a>
impl<'a> Hash for TemplateAttribute<'a>
§impl<'a> Ord for TemplateAttribute<'a>
impl<'a> Ord for TemplateAttribute<'a>
§fn cmp(&self, other: &TemplateAttribute<'a>) -> Ordering
fn cmp(&self, other: &TemplateAttribute<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
§impl<'a> PartialEq<TemplateAttribute<'a>> for TemplateAttribute<'a>
impl<'a> PartialEq<TemplateAttribute<'a>> for TemplateAttribute<'a>
§fn eq(&self, other: &TemplateAttribute<'a>) -> bool
fn eq(&self, other: &TemplateAttribute<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<'a> PartialOrd<TemplateAttribute<'a>> for TemplateAttribute<'a>
impl<'a> PartialOrd<TemplateAttribute<'a>> for TemplateAttribute<'a>
§fn partial_cmp(&self, other: &TemplateAttribute<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &TemplateAttribute<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl<'a> Serialize for TemplateAttribute<'a>
impl<'a> Serialize for TemplateAttribute<'a>
§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
impl<'a> Eq for TemplateAttribute<'a>
impl<'a> StructuralEq for TemplateAttribute<'a>
impl<'a> StructuralPartialEq for TemplateAttribute<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for TemplateAttribute<'a>
impl<'a> Send for TemplateAttribute<'a>
impl<'a> Sync for TemplateAttribute<'a>
impl<'a> Unpin for TemplateAttribute<'a>
impl<'a> UnwindSafe for TemplateAttribute<'a>
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more