[−]Enum sauron::prelude::mt_dom::AttValue
Attribute Value which can be a plain attribute or a callback
Variants
Plain value
Callback(Callback<EVENT, MSG>)
An event listener attribute
Implementations
impl<VAL, EVENT, MSG> AttValue<VAL, EVENT, MSG>
impl<VAL, EVENT, MSG> AttValue<VAL, EVENT, MSG> where
EVENT: 'static,
MSG: 'static,
EVENT: 'static,
MSG: 'static,
pub fn map_callback<MSG2>(
self,
cb: Callback<MSG, MSG2>
) -> AttValue<VAL, EVENT, MSG2> where
MSG2: 'static,
self,
cb: Callback<MSG, MSG2>
) -> AttValue<VAL, EVENT, MSG2> where
MSG2: 'static,
transform att_value such that MSG becomes MSG2
pub fn get_callback(&self) -> Option<&Callback<EVENT, MSG>>
return a reference to the callback if it is a callback
pub fn is_callback(&self) -> bool
return true if this is a callback
Trait Implementations
impl<VAL, EVENT, MSG> Clone for AttValue<VAL, EVENT, MSG> where
VAL: Clone,
VAL: Clone,
Note: using the #[derive(Clone)] needs EVENT and MSG to also be Clone
The reason this is manually implemented is, so that EVENT and MSG doesn't need to be Clone as it is part of the Callback objects and cloning it is just cloning the pointer of the actual callback function
fn clone(&self) -> AttValue<VAL, EVENT, MSG>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<VAL, EVENT, MSG> Debug for AttValue<VAL, EVENT, MSG> where
VAL: 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<VAL, EVENT, MSG> From<VAL> for AttValue<VAL, EVENT, MSG>
impl<VAL, EVENT, MSG> PartialEq<AttValue<VAL, EVENT, MSG>> for AttValue<VAL, EVENT, MSG> where
VAL: PartialEq<VAL>,
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
Auto Trait Implementations
impl<VAL, EVENT, MSG> !RefUnwindSafe for AttValue<VAL, EVENT, MSG>
impl<VAL, EVENT, MSG> !Send for AttValue<VAL, EVENT, MSG>
impl<VAL, EVENT, MSG> !Sync for AttValue<VAL, EVENT, MSG>
impl<VAL, EVENT, MSG> Unpin for AttValue<VAL, EVENT, MSG> where
VAL: Unpin,
VAL: Unpin,
impl<VAL, EVENT, MSG> !UnwindSafe for AttValue<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 R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> From<!> for T
[src]
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>,