pub struct StateBase<Q, K> { /* private fields */ }
Expand description
StateBase
is an abstract object that allows a particular kind of state to be
associated with some generic state Q
Implementations§
Source§impl<K, Q> StateBase<Q, K>where
K: RawStateKind,
impl<K, Q> StateBase<Q, K>where
K: RawStateKind,
Sourcepub const fn new(state: Q) -> StateBase<Q, K>
pub const fn new(state: Q) -> StateBase<Q, K>
returns a new instance of StateBase
with the given value
Sourcepub fn new_with<F>(f: F) -> StateBase<Q, K>where
F: FnOnce() -> Q,
pub fn new_with<F>(f: F) -> StateBase<Q, K>where
F: FnOnce() -> Q,
returns a new instance of StateBase
using the output of the given function F
Trait Implementations§
Source§impl<'de, Q, K> Deserialize<'de> for StateBase<Q, K>
impl<'de, Q, K> Deserialize<'de> for StateBase<Q, K>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateBase<Q, K>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StateBase<Q, K>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Q, K> Ord for StateBase<Q, K>
impl<Q, K> Ord for StateBase<Q, K>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Q, K> PartialOrd for StateBase<Q, K>where
Q: PartialOrd,
K: PartialOrd,
impl<Q, K> PartialOrd for StateBase<Q, K>where
Q: PartialOrd,
K: PartialOrd,
Source§impl<Q, K> Serialize for StateBase<Q, K>where
Q: Serialize,
impl<Q, K> Serialize for StateBase<Q, K>where
Q: Serialize,
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<Q, K> Copy for StateBase<Q, K>
impl<Q, K> Eq for StateBase<Q, K>
impl<Q, K> StructuralPartialEq for StateBase<Q, K>
Auto Trait Implementations§
impl<Q, K> Freeze for StateBase<Q, K>where
Q: Freeze,
impl<Q, K> RefUnwindSafe for StateBase<Q, K>where
Q: RefUnwindSafe,
K: RefUnwindSafe,
impl<Q, K> Send for StateBase<Q, K>
impl<Q, K> Sync for StateBase<Q, K>
impl<Q, K> Unpin for StateBase<Q, K>
impl<Q, K> UnwindSafe for StateBase<Q, K>where
Q: UnwindSafe,
K: UnwindSafe,
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