pub struct StreamRecordIndex { /* private fields */ }Implementations§
Source§impl StreamRecordIndex
impl StreamRecordIndex
pub fn new() -> Self
pub fn restore( first_record: u64, record_offsets: Vec<u64>, retained_offset: u64, tail_offset: u64, ) -> Result<Self, RecordIndexError>
pub fn range(&self) -> Result<StreamRecordRange, RecordIndexError>
pub fn record_offsets(&self) -> &[u64]
pub fn append_relative_ends( &mut self, base_offset: u64, payload_len: u64, relative_ends: &[u64], ) -> Result<StreamRecordRange, RecordIndexError>
pub fn offset_for( &self, record: u64, tail_offset: u64, ) -> Result<u64, RecordIndexError>
pub fn record_for_offset( &self, offset: u64, tail_offset: u64, ) -> Result<u64, RecordIndexError>
pub fn retain_from_offset( &mut self, retained_offset: u64, tail_offset: u64, ) -> Result<u64, RecordIndexError>
pub fn validate( &self, retained_offset: u64, tail_offset: u64, ) -> Result<(), RecordIndexError>
Trait Implementations§
Source§impl Clone for StreamRecordIndex
impl Clone for StreamRecordIndex
Source§fn clone(&self) -> StreamRecordIndex
fn clone(&self) -> StreamRecordIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamRecordIndex
impl Debug for StreamRecordIndex
Source§impl Default for StreamRecordIndex
impl Default for StreamRecordIndex
Source§fn default() -> StreamRecordIndex
fn default() -> StreamRecordIndex
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StreamRecordIndex
impl<'de> Deserialize<'de> for StreamRecordIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StreamRecordIndex
Source§impl PartialEq for StreamRecordIndex
impl PartialEq for StreamRecordIndex
Source§impl Serialize for StreamRecordIndex
impl Serialize for StreamRecordIndex
impl StructuralPartialEq for StreamRecordIndex
Auto Trait Implementations§
impl Freeze for StreamRecordIndex
impl RefUnwindSafe for StreamRecordIndex
impl Send for StreamRecordIndex
impl Sync for StreamRecordIndex
impl Unpin for StreamRecordIndex
impl UnsafeUnpin for StreamRecordIndex
impl UnwindSafe for StreamRecordIndex
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