Struct freya::prelude::SwitchProps
pub struct SwitchProps<'a> {
pub enabled: bool,
pub ontoggled: EventHandler<'a, ()>,
}
Expand description
Switch
component properties.
Fields§
§enabled: bool
Whether the Switch
is enabled or not.
ontoggled: EventHandler<'a, ()>
Handler for the ontoggled
event.
Implementations§
§impl<'a> SwitchProps<'a>
impl<'a> SwitchProps<'a>
Trait Implementations§
§impl<'a> Properties for SwitchProps<'a>
impl<'a> Properties for SwitchProps<'a>
§type Builder = SwitchPropsBuilder<'a, ((), ())>
type Builder = SwitchPropsBuilder<'a, ((), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
§fn builder() -> <SwitchProps<'a> as Properties>::Builder
fn builder() -> <SwitchProps<'a> as Properties>::Builder
Create a builder for this component.
§unsafe fn memoize(&self, other: &SwitchProps<'a>) -> bool
unsafe fn memoize(&self, other: &SwitchProps<'a>) -> bool
Memoization can only happen if the props are valid for the ’static lifetime Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SwitchProps<'a>
impl<'a> !Send for SwitchProps<'a>
impl<'a> !Sync for SwitchProps<'a>
impl<'a> Unpin for SwitchProps<'a>
impl<'a> !UnwindSafe for SwitchProps<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more