Struct aper::sync::client::StateClient
source · pub struct StateClient<S: StateMachine> { /* private fields */ }
Implementations§
source§impl<S: StateMachine> StateClient<S>
impl<S: StateMachine> StateClient<S>
pub fn new(state: S, version: StateVersionNumber) -> Self
pub fn push_transition( &mut self, transition: S::Transition ) -> Result<MessageToServer<S>, S::Conflict>
pub fn next_transition(&mut self) -> ClientTransitionNumber
pub fn receive_message_from_server( &mut self, message: MessageToClient<S> ) -> Option<MessageToServer<S>>
pub fn state(&self) -> Rc<S>
Trait Implementations§
source§impl<S: Clone + StateMachine> Clone for StateClient<S>where
S::Transition: Clone,
impl<S: Clone + StateMachine> Clone for StateClient<S>where
S::Transition: Clone,
source§fn clone(&self) -> StateClient<S>
fn clone(&self) -> StateClient<S>
Returns a copy 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<S: Debug + StateMachine> Debug for StateClient<S>where
S::Transition: Debug,
impl<S: Debug + StateMachine> Debug for StateClient<S>where
S::Transition: Debug,
source§impl<S: StateMachine + Default> Default for StateClient<S>
impl<S: StateMachine + Default> Default for StateClient<S>
Auto Trait Implementations§
impl<S> Freeze for StateClient<S>
impl<S> RefUnwindSafe for StateClient<S>
impl<S> !Send for StateClient<S>
impl<S> !Sync for StateClient<S>
impl<S> Unpin for StateClient<S>
impl<S> UnwindSafe for StateClient<S>
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