pub enum Tristate {
Auto,
On,
Off,
}Expand description
A three-state toggle. A bool would be a lie when “unset” is a real, distinct
choice — this makes the third state explicit instead of smuggling it in as
Option<bool>.
Variants§
Implementations§
Trait Implementations§
impl Copy for Tristate
impl Eq for Tristate
Source§impl Serialize for Tristate
impl Serialize for Tristate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Tristate
Auto Trait Implementations§
impl Freeze for Tristate
impl RefUnwindSafe for Tristate
impl Send for Tristate
impl Sync for Tristate
impl Unpin for Tristate
impl UnsafeUnpin for Tristate
impl UnwindSafe for Tristate
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