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]
👎 Deprecated: Call of .deanonymize()
on named type.
#[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]
👎 Deprecated: Call of .prefer_thread_safe()
on Attribute
.
#[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]
👎 Deprecated: Call of .prefer_thread_safe_ref()
on Attribute
.
#[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> Ord for Attribute<'a>
[src]
impl<'a> Ord for Attribute<'a>
[src]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]
fn partial_cmp(&self, other: &Attribute<'a>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> Vdom for Attribute<'a>
[src]
impl<'a> Vdom for Attribute<'a>
[src]type ThreadSafety = ThreadSafe
type ThreadSafety = ThreadSafe
The ThreadSafety
of the Vdom
type, either ThreadSafe
or ThreadBound
. Read more
impl<'a> Copy for Attribute<'a>
[src]
impl<'a> Eq for Attribute<'a>
[src]
impl<'a> StructuralEq for Attribute<'a>
[src]
impl<'a> StructuralPartialEq for Attribute<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Attribute<'a>
impl<'a> Send for Attribute<'a>
impl<'a> Sync for Attribute<'a>
impl<'a> Unpin for Attribute<'a>
impl<'a> UnwindSafe for Attribute<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more