Skip to main content

Toggleable

Trait Toggleable 

Source
pub trait Toggleable {
    // Required method
    fn toggle_state(self, selected: bool) -> Self;
}
Expand description

A trait for elements that can be toggled.

Implement this for elements that are visually distinct when in two opposing states, like checkboxes or switches.

Required Methods§

Source

fn toggle_state(self, selected: bool) -> Self

Sets whether the element is selected.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Toggleable for AnimationElement<T>
where T: Toggleable + 'static,

Source§

fn toggle_state(self, selected: bool) -> Self

Implementors§