pub struct StatFlowState<T: StatFlowSpec> {
pub stat: T::Stat,
}
Fields§
§stat: T::Stat
Implementations§
Source§impl<T: StatFlowSpec> StatFlowState<T>
impl<T: StatFlowSpec> StatFlowState<T>
Trait Implementations§
Source§impl<T: Clone + StatFlowSpec> Clone for StatFlowState<T>
impl<T: Clone + StatFlowSpec> Clone for StatFlowState<T>
Source§fn clone(&self) -> StatFlowState<T>
fn clone(&self) -> StatFlowState<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug + StatFlowSpec> Debug for StatFlowState<T>
impl<T: Debug + StatFlowSpec> Debug for StatFlowState<T>
Source§impl<'de, T: StatFlowSpec> Deserialize<'de> for StatFlowState<T>where
T::Stat: Deserialize<'de>,
impl<'de, T: StatFlowSpec> Deserialize<'de> for StatFlowState<T>where
T::Stat: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: StatFlowSpec> Flow for StatFlowState<T>
impl<T: StatFlowSpec> Flow for StatFlowState<T>
Source§type Action = StatFlowAction
type Action = StatFlowAction
ControlEvent
- that send from a client to a serverSource§type Event = StatFlowEvent<T>
type Event = StatFlowEvent<T>
UpdateEvent
- that sent from a server to a clientfn stream_type() -> StreamType
fn apply(&mut self, event: Self::Event)
fn pack_state(&self) -> Result<PackedState, Error>
fn unpack_state(data: &PackedState) -> Result<Self, Error>
fn pack_event(delta: &Self::Event) -> Result<PackedEvent, Error>
fn unpack_event(data: &PackedEvent) -> Result<Self::Event, Error>
fn pack_action(action: &Self::Action) -> Result<PackedAction, Error>
fn unpack_action(data: &PackedAction) -> Result<Self::Action, Error>
Source§impl<T: StatFlowSpec> Serialize for StatFlowState<T>
impl<T: StatFlowSpec> Serialize for StatFlowState<T>
Auto Trait Implementations§
impl<T> Freeze for StatFlowState<T>
impl<T> RefUnwindSafe for StatFlowState<T>
impl<T> Send for StatFlowState<T>
impl<T> Sync for StatFlowState<T>
impl<T> Unpin for StatFlowState<T>
impl<T> UnwindSafe for StatFlowState<T>
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