Struct StoreResume
pub struct StoreResume { /* private fields */ }Expand description
Where a StoreSyncPeer pull left off: the
first far-store position of the last group it
forwarded, or the start.
Owned and Copy, so it outlives the peer and the store handle (SY-16), and
its text form is a ResumeToken for the wire: the decimal position, and
"0" for the start — a value no position takes, because positions start at
one.
Implementations§
§impl StoreResume
impl StoreResume
pub const fn start() -> Self
pub const fn start() -> Self
The token that reads the far store from its first event.
pub const fn after(position: SequencePosition) -> Self
pub const fn after(position: SequencePosition) -> Self
The token that reads the far store’s groups above the group whose first
position is position.
pub const fn last_forwarded(self) -> Option<SequencePosition>
pub const fn last_forwarded(self) -> Option<SequencePosition>
The first position of the last group forwarded, or None from the
start.
Trait Implementations§
§impl Clone for StoreResume
impl Clone for StoreResume
impl Copy for StoreResume
§impl Debug for StoreResume
impl Debug for StoreResume
impl Eq for StoreResume
§impl From<StoreResume> for ResumeToken
impl From<StoreResume> for ResumeToken
§fn from(resume: StoreResume) -> Self
fn from(resume: StoreResume) -> Self
Converts to this type from the input type.
§impl Hash for StoreResume
impl Hash for StoreResume
§impl Ord for StoreResume
impl Ord for StoreResume
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
§impl PartialEq for StoreResume
impl PartialEq for StoreResume
§impl PartialOrd for StoreResume
impl PartialOrd for StoreResume
impl StructuralPartialEq for StoreResume
§impl TryFrom<&ResumeToken> for StoreResume
Reads back the text From<StoreResume>
wrote, and nothing else.
impl TryFrom<&ResumeToken> for StoreResume
Reads back the text From<StoreResume>
wrote, and nothing else.
Strict, so the text form is one-to-one: digits only, no sign, no leading
zero but the start’s "0", and within u64.
§type Error = ForeignToken
type Error = ForeignToken
The type returned in the event of a conversion error.
§fn try_from(token: &ResumeToken) -> Result<Self, Self::Error>
fn try_from(token: &ResumeToken) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for StoreResume
impl RefUnwindSafe for StoreResume
impl Send for StoreResume
impl Sync for StoreResume
impl Unpin for StoreResume
impl UnsafeUnpin for StoreResume
impl UnwindSafe for StoreResume
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