pub enum Switch {
On,
Off,
}
Expand description
Switch something on or off.
Convenience enum and wrapper around a bool, which more explicit about the intention to enable
or disable something, in comparison to true
or false
.
Variants§
Trait Implementations§
Source§impl Ord for Switch
impl Ord for Switch
Source§impl PartialOrd for Switch
impl PartialOrd for Switch
impl Copy for Switch
impl Eq for Switch
impl StructuralPartialEq for Switch
Auto Trait Implementations§
impl Freeze for Switch
impl RefUnwindSafe for Switch
impl Send for Switch
impl Sync for Switch
impl Unpin for Switch
impl UnwindSafe for Switch
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