pub struct ConsistencyTokenCell(/* private fields */);Expand description
A consistency token in memory: what a client holds by default. Give one
in an Arc to several clients for them to share it.
Implementations§
Trait Implementations§
Source§impl ConsistencyTokenStore for ConsistencyTokenCell
impl ConsistencyTokenStore for ConsistencyTokenCell
Source§fn remove(&self, refused: &str)
fn remove(&self, refused: &str)
Forgets
refused, a token the API refused to read, if it is still
the one held; a token that replaced it in the meantime stays. The
default reads and then sets the token, so it can lose a token set
in between; a store that can do it at once should.Source§fn replace(&self, presented: &str, answered: String)
fn replace(&self, presented: &str, answered: String)
Replaces the token held with
answered, the token the answer to a
call that presented presented (empty for none) carried. A store
that holds a token other than presented by then was written by a
concurrent call in between, and may keep one or the other as it
sees fit; the default sets answered, so the token
answered last is kept.Source§impl Debug for ConsistencyTokenCell
The token itself is left out: it is a credential of sorts, naming what
the client wrote.
impl Debug for ConsistencyTokenCell
The token itself is left out: it is a credential of sorts, naming what the client wrote.
Auto Trait Implementations§
impl !Freeze for ConsistencyTokenCell
impl Forget for ConsistencyTokenCell
impl Move for ConsistencyTokenCell
impl RefUnwindSafe for ConsistencyTokenCell
impl Send for ConsistencyTokenCell
impl Sync for ConsistencyTokenCell
impl Unpin for ConsistencyTokenCell
impl UnsafeUnpin for ConsistencyTokenCell
impl UnwindSafe for ConsistencyTokenCell
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