AttrGroupValue

Enum AttrGroupValue 

Source
pub enum AttrGroupValue {
Show 15 variants AttrValue(AttrValue), Css { css: Css, class_name: Option<String>, }, HookKeyDown(Rc<Callback1<KeyDownEvent, bool>>), OnBlur(Rc<Callback<()>>), OnChange(Rc<Callback1<String, ()>>), OnClick(Rc<Callback1<ClickEvent, ()>>), OnDropfile(Rc<Callback1<DropFileEvent, ()>>), OnInput(Rc<Callback1<String, ()>>), OnKeyDown(Rc<Callback1<KeyDownEvent, bool>>), OnLoad(Rc<Callback<()>>), OnMouseDown(Rc<Callback<bool>>), OnMouseEnter(Rc<Callback<()>>), OnMouseLeave(Rc<Callback<()>>), OnMouseUp(Rc<Callback<bool>>), OnSubmit(Rc<Callback<()>>),
}

Variants§

§

AttrValue(AttrValue)

§

Css

Fields

§css: Css
§class_name: Option<String>
§

HookKeyDown(Rc<Callback1<KeyDownEvent, bool>>)

§

OnBlur(Rc<Callback<()>>)

§

OnChange(Rc<Callback1<String, ()>>)

§

OnClick(Rc<Callback1<ClickEvent, ()>>)

§

OnDropfile(Rc<Callback1<DropFileEvent, ()>>)

§

OnInput(Rc<Callback1<String, ()>>)

§

OnKeyDown(Rc<Callback1<KeyDownEvent, bool>>)

§

OnLoad(Rc<Callback<()>>)

§

OnMouseDown(Rc<Callback<bool>>)

§

OnMouseEnter(Rc<Callback<()>>)

§

OnMouseLeave(Rc<Callback<()>>)

§

OnMouseUp(Rc<Callback<bool>>)

§

OnSubmit(Rc<Callback<()>>)

Implementations§

Source§

impl AttrGroupValue

Source

pub fn css(css: impl Into<Css>, class_name: Option<String>) -> Self

Source

pub fn hook_key_down(callback: impl Into<Callback1<KeyDownEvent, bool>>) -> Self

Source

pub fn on_blur(callback: impl Into<Callback<()>>) -> Self

Source

pub fn on_change(callback: impl Into<Callback1<String, ()>>) -> Self

Source

pub fn on_click(callback: impl Into<Callback1<ClickEvent, ()>>) -> Self

Source

pub fn on_dropfile(callback: impl Into<Callback1<DropFileEvent, ()>>) -> Self

Source

pub fn on_input(callback: impl Into<Callback1<String, ()>>) -> Self

Source

pub fn on_key_down(callback: impl Into<Callback1<KeyDownEvent, bool>>) -> Self

Source

pub fn on_load(callback: impl Into<Callback<()>>) -> Self

Source

pub fn on_mouse_down(callback: impl Into<Callback<bool>>) -> Self

Source

pub fn on_mouse_enter(callback: impl Into<Callback<()>>) -> Self

Source

pub fn on_mouse_leave(callback: impl Into<Callback<()>>) -> Self

Source

pub fn on_mouse_up(callback: impl Into<Callback<bool>>) -> Self

Source

pub fn on_submit(callback: impl Into<Callback<()>>) -> Self

Source

pub fn to_string_or_empty(&self) -> Computed<String>

Extract Computed<String> from this AttrGroupValue if possible.

Otherwise (for css and event handlers variants) this gives constant empty string. For displaying in HTML it’s better to use .embed() method (which uses this one internally).

Trait Implementations§

Source§

impl Clone for AttrGroupValue

Source§

fn clone(&self) -> AttrGroupValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl EmbedDom for &AttrGroupValue

Source§

impl EmbedDom for AttrGroupValue

Source§

impl From<&AttrGroupValue> for AttrGroupValue

Source§

fn from(value: &Self) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<AttrValue>> From<T> for AttrGroupValue

Source§

fn from(value: T) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.