pub enum FilePosition {
Beginning,
End,
Sequence(u64),
Timestamp(u64),
}Expand description
A position in a stream file’s retained log, accepted by
Seeker::seek.
Captured positions (Positioned::position) carry the pinned semantics the framework
defines: seeking to one redelivers exactly that message (the transport’s sequence rewind
is inclusive). The other forms keep the transport’s own semantics: Beginning replays
everything retained, End skips to the tip, and Timestamp resumes at the earliest
message strictly later than the instant (milliseconds since the Unix epoch).
Variants§
Beginning
Everything retained.
End
The tip of the stream.
Sequence(u64)
A captured message sequence (inclusive).
Timestamp(u64)
Milliseconds since the Unix epoch (exclusive).
Implementations§
Source§impl FilePosition
impl FilePosition
Sourcepub const fn beginning() -> Self
pub const fn beginning() -> Self
Everything retained: FilePosition::Beginning.
Sourcepub const fn end() -> Self
pub const fn end() -> Self
The tip of the stream: FilePosition::End.
Sourcepub const fn sequence(sequence: u64) -> Self
pub const fn sequence(sequence: u64) -> Self
A message sequence, redelivered inclusively: FilePosition::Sequence.
Sourcepub const fn timestamp(millis: u64) -> Self
pub const fn timestamp(millis: u64) -> Self
Milliseconds since the Unix epoch, resuming strictly later:
FilePosition::Timestamp.
Trait Implementations§
Source§impl Clone for FilePosition
impl Clone for FilePosition
Source§fn clone(&self) -> FilePosition
fn clone(&self) -> FilePosition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more