Struct lignin::Attribute [−][src]
Fields
name: &'a str
The name.
Implementation Contract
Security
While applications should generally avoid it, Attribute::name
may contain characters that are unexpected in this position.
Renderers may only process these verbatim iff they can expect this to not cause security issues.
For example: Passing an invalid attribute name to a DOM API isolated in a dedicated parameter is probably okay, as long as something along the way validates it doesn’t contain
'\0'
.Serializing an invalid attribute name to HTML is a very bad idea, so renderers must never do so.
value: &'a str
The unescaped value.
Implementations
impl<'a> Attribute<'a>
[src]
impl<'a> Attribute<'a>
[src]#[must_use]pub fn deanonymize(self) -> Self
[src]
Call of .deanonymize()
on named type.
When called on an opaque type, deanonymizes it into the underlying named type.
Both AutoSafe
and Deanonymize
must be in scope and the method must be called without qualification for this to work.
Calling this method on a named type returns the value and type unchanged and produces a deprecation warning.
#[must_use]pub fn prefer_thread_safe(self) -> Self
[src]
Call of .prefer_thread_safe()
on Attribute
.
Gently nudges the compiler to choose the ThreadSafe
version of a value if both are possible.
This method is by value, so it will resolve with higher priority than the by-reference method on the ThreadBound
type.
Note that not all tooling will show the correct overload here, but the compiler knows which to pick.
Calling this method on
Attribute
produces a deprecation warning since the type is alwaysThreadSafe
.
#[must_use]pub fn prefer_thread_safe_ref(&self) -> &Self
[src]
Call of .prefer_thread_safe_ref()
on Attribute
.
Gently nudges the compiler to choose the ThreadSafe
version of a reference if both are possible.
This method is once by single reference, so it will resolve with higher priority than the twice-by-reference method on the ThreadBound
type.
Note that not all tooling will show the correct overload here, but the compiler knows which to pick.
Calling this method on
Attribute
produces a deprecation warning since the type is alwaysThreadSafe
.
Trait Implementations
impl<'a> PartialOrd<Attribute<'a>> for Attribute<'a>
[src]
impl<'a> PartialOrd<Attribute<'a>> for Attribute<'a>
[src]fn partial_cmp(&self, other: &Attribute<'a>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> StructuralEq for Attribute<'a>
[src]
impl<'a> StructuralEq for Attribute<'a>
[src]impl<'a> StructuralPartialEq for Attribute<'a>
[src]
impl<'a> StructuralPartialEq for Attribute<'a>
[src]impl<'a> Vdom for Attribute<'a>
[src]
impl<'a> Vdom for Attribute<'a>
[src]type ThreadSafety = ThreadSafe
The ThreadSafety
of the Vdom
type, either ThreadSafe
or ThreadBound
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for Attribute<'a>
impl<'a> RefUnwindSafe for Attribute<'a>
impl<'a> UnwindSafe for Attribute<'a>
impl<'a> UnwindSafe for Attribute<'a>