pub enum SwitchState {
Off,
On,
}
Expand description
The only two states of a switch.
Variants§
Implementations§
Source§impl SwitchState
impl SwitchState
Sourcepub fn from_string(string: String) -> Result<Self, SwitchStateConversionError>
pub fn from_string(string: String) -> Result<Self, SwitchStateConversionError>
Returns SwitchState enum value from the string value. Accepted values: [“OFF”, “ON”]
Trait Implementations§
Source§impl Debug for SwitchState
impl Debug for SwitchState
Source§impl Display for SwitchState
impl Display for SwitchState
Source§impl PartialEq for SwitchState
impl PartialEq for SwitchState
impl Eq for SwitchState
impl StructuralPartialEq for SwitchState
Auto Trait Implementations§
impl Freeze for SwitchState
impl RefUnwindSafe for SwitchState
impl Send for SwitchState
impl Sync for SwitchState
impl Unpin for SwitchState
impl UnwindSafe for SwitchState
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.