pub struct Client { /* private fields */ }Expand description
The readonly view cache and its resynchronization state.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(backend: &BackendInfo) -> Self
pub fn new(backend: &BackendInfo) -> Self
Construct from the handshake’s backend identity.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
The applied view generation (0 before the first publication).
Sourcepub fn view(&self) -> Option<&ViewSnapshot>
pub fn view(&self) -> Option<&ViewSnapshot>
The cached view, if one has been published.
Sourcepub fn poisoned(&self) -> Option<ResyncReason>
pub fn poisoned(&self) -> Option<ResyncReason>
Why the client is poisoned, if it is.
Sourcepub fn base_stamp(&self) -> Result<BaseStamp, ClientError>
pub fn base_stamp(&self) -> Result<BaseStamp, ClientError>
The base stamp for the next action. Poisoned clients and clients that never saw a publication may not act (AR09: no optimistic replay of uncertain state).
Sourcepub fn apply(&mut self, message: &ServerMessage) -> Vec<ClientEvent>
pub fn apply(&mut self, message: &ServerMessage) -> Vec<ClientEvent>
Apply one server message to the cache. Control messages (ack,
error) carry no view state and are the transport’s business;
they return no events here.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
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