[−]Struct sauron::prelude::mt_dom::Attribute
These are the plain attributes of an element
Implementations
impl<NS, ATT, VAL, EVENT, MSG> Attribute<NS, ATT, VAL, EVENT, MSG>
pub fn new(
namespace: Option<NS>,
name: ATT,
value: VAL
) -> Attribute<NS, ATT, VAL, EVENT, MSG>
namespace: Option<NS>,
name: ATT,
value: VAL
) -> Attribute<NS, ATT, VAL, EVENT, MSG>
create a plain attribute with namespace
pub fn with_multiple_values(
namespace: Option<NS>,
name: ATT,
value: Vec<VAL>
) -> Attribute<NS, ATT, VAL, EVENT, MSG>
namespace: Option<NS>,
name: ATT,
value: Vec<VAL>
) -> Attribute<NS, ATT, VAL, EVENT, MSG>
create from multiple values
pub fn name(&self) -> &ATTⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
return the name of this attribute
pub fn value(&self) -> &[AttValue<VAL, EVENT, MSG>]ⓘ
return the value of this attribute
pub fn namespace(&self) -> Option<&NS>
return the namespace of this attribute
pub fn get_plain(&self) -> Vec<&VAL>ⓘ
return the plain value if it is a plain value
impl<NS, ATT, VAL, EVENT, MSG> Attribute<NS, ATT, VAL, EVENT, MSG> where
EVENT: 'static,
MSG: 'static,
EVENT: 'static,
MSG: 'static,
pub fn map_callback<MSG2>(
self,
cb: Callback<MSG, MSG2>
) -> Attribute<NS, ATT, VAL, EVENT, MSG2> where
MSG2: 'static,
self,
cb: Callback<MSG, MSG2>
) -> Attribute<NS, ATT, VAL, EVENT, MSG2> where
MSG2: 'static,
transform the callback of this attribute
pub fn get_callback(&self) -> Vec<&Callback<EVENT, MSG>>ⓘ
return the callback values of this attribute
Trait Implementations
impl<NS, ATT, VAL, EVENT, MSG> Clone for Attribute<NS, ATT, VAL, EVENT, MSG> where
ATT: Clone,
NS: Clone,
VAL: Clone,
ATT: Clone,
NS: Clone,
VAL: Clone,
Note: using the #[derive(Debug)] needs EVENT and MSG to also be Debug
The reason this is manually implemented is, so that EVENT and MSG doesn't need to be Debug as it is part of the Callback objects and are not shown.
fn clone(&self) -> Attribute<NS, ATT, VAL, EVENT, MSG>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<NS, ATT, VAL, EVENT, MSG> Debug for Attribute<NS, ATT, VAL, EVENT, MSG> where
ATT: Debug,
NS: Debug,
VAL: Debug,
ATT: Debug,
NS: Debug,
VAL: Debug,
Note: using the #[derive(Debug)] needs EVENT and MSG to also be Debug
The reason this is manually implemented is, so that EVENT and MSG doesn't need to be Debug as it is part of the Callback objects and are not shown.
impl<NS, ATT, VAL, EVENT, MSG> PartialEq<Attribute<NS, ATT, VAL, EVENT, MSG>> for Attribute<NS, ATT, VAL, EVENT, MSG> where
ATT: PartialEq<ATT>,
NS: PartialEq<NS>,
VAL: PartialEq<VAL>,
ATT: PartialEq<ATT>,
NS: PartialEq<NS>,
VAL: PartialEq<VAL>,
Note: using the #[derive(PartialEq)] needs EVENT and MSG to also be PartialEq.
The reason this is manually implemented is, so that EVENT and MSG doesn't need to be PartialEq as it is part of the Callback objects and are not compared
fn eq(&self, other: &Attribute<NS, ATT, VAL, EVENT, MSG>) -> bool
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<MSG> Render for Attribute<&'static str, &'static str, AttributeValue, Event, MSG>
[src]
Auto Trait Implementations
impl<NS, ATT, VAL, EVENT, MSG> !RefUnwindSafe for Attribute<NS, ATT, VAL, EVENT, MSG>
impl<NS, ATT, VAL, EVENT, MSG> !Send for Attribute<NS, ATT, VAL, EVENT, MSG>
impl<NS, ATT, VAL, EVENT, MSG> !Sync for Attribute<NS, ATT, VAL, EVENT, MSG>
impl<NS, ATT, VAL, EVENT, MSG> Unpin for Attribute<NS, ATT, VAL, EVENT, MSG> where
ATT: Unpin,
NS: Unpin,
VAL: Unpin,
ATT: Unpin,
NS: Unpin,
VAL: Unpin,
impl<NS, ATT, VAL, EVENT, MSG> !UnwindSafe for Attribute<NS, ATT, VAL, EVENT, MSG>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow(&self) -> &TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,