Struct freya::components::SwitchProps
source · 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§
Trait Implementations§
source§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.
source§fn builder() -> <SwitchProps<'a> as Properties>::Builder
fn builder() -> <SwitchProps<'a> as Properties>::Builder
Create a builder for this component.
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