pub enum StateValue {
Bool(bool),
Mixed,
}Expand description
What a source or a selector says about one state.
Variants§
Implementations§
Source§impl StateValue
impl StateValue
Sourcepub const fn as_checked(self) -> Checked
pub const fn as_checked(self) -> Checked
The value as a Checked.
Sourcepub const fn as_bool(self) -> Option<bool>
pub const fn as_bool(self) -> Option<bool>
The value as a flag, or None for StateValue::Mixed.
Trait Implementations§
Source§impl Clone for StateValue
impl Clone for StateValue
Source§fn clone(&self) -> StateValue
fn clone(&self) -> StateValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StateValue
Source§impl Debug for StateValue
impl Debug for StateValue
Source§impl<'de> Deserialize<'de> for StateValue
impl<'de> Deserialize<'de> for StateValue
Source§fn deserialize<D>(
deserializer: D,
) -> Result<StateValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<StateValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StateValue
impl Display for StateValue
impl Eq for StateValue
Source§impl From<Checked> for StateValue
impl From<Checked> for StateValue
Source§fn from(checked: Checked) -> StateValue
fn from(checked: Checked) -> StateValue
Converts to this type from the input type.
Source§impl From<bool> for StateValue
impl From<bool> for StateValue
Source§fn from(on: bool) -> StateValue
fn from(on: bool) -> StateValue
Converts to this type from the input type.
Source§impl FromStr for StateValue
impl FromStr for StateValue
Source§type Err = ParseStateValueError
type Err = ParseStateValueError
The associated error which can be returned from parsing.
Source§fn from_str(text: &str) -> Result<StateValue, ParseStateValueError>
fn from_str(text: &str) -> Result<StateValue, ParseStateValueError>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for StateValue
impl Hash for StateValue
Source§impl PartialEq for StateValue
impl PartialEq for StateValue
Source§impl Serialize for StateValue
impl Serialize for StateValue
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 StateValue
Auto Trait Implementations§
impl Forget for StateValue
impl Freeze for StateValue
impl Move for StateValue
impl RefUnwindSafe for StateValue
impl Send for StateValue
impl Sync for StateValue
impl Unpin for StateValue
impl UnsafeUnpin for StateValue
impl UnwindSafe for StateValue
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