pub struct OffsetLog<ByteType> {
pub file: File,
/* private fields */
}Fields§
§file: FileImplementations§
Source§impl<ByteType> OffsetLog<ByteType>
impl<ByteType> OffsetLog<ByteType>
pub fn new<P: AsRef<Path>>(path: P) -> Result<OffsetLog<ByteType>, Error>
pub fn open_read_only<P: AsRef<Path>>( path: P, ) -> Result<OffsetLog<ByteType>, Error>
pub fn from_file(file: File) -> Result<OffsetLog<ByteType>, Error>
pub fn end(&self) -> u64
pub fn read(&self, offset: u64) -> Result<ReadResult, Error>
pub fn append_batch<T: AsRef<[u8]>>( &mut self, buffs: &[T], ) -> Result<Vec<u64>, Error>
pub fn iter(&self) -> Forward<OffsetLogIter<ByteType>> ⓘ
pub fn bidir_iter(&self) -> OffsetLogIter<ByteType>
pub fn bidir_iter_at_offset(&self, offset: u64) -> OffsetLogIter<ByteType>
Trait Implementations§
Source§impl<ByteType> IterAtOffset<Forward<OffsetLogIter<ByteType>>> for OffsetLog<ByteType>
impl<ByteType> IterAtOffset<Forward<OffsetLogIter<ByteType>>> for OffsetLog<ByteType>
fn iter_at_offset(&self, offset: u64) -> Forward<OffsetLogIter<ByteType>> ⓘ
Auto Trait Implementations§
impl<ByteType> Freeze for OffsetLog<ByteType>
impl<ByteType> RefUnwindSafe for OffsetLog<ByteType>where
ByteType: RefUnwindSafe,
impl<ByteType> Send for OffsetLog<ByteType>where
ByteType: Send,
impl<ByteType> Sync for OffsetLog<ByteType>where
ByteType: Sync,
impl<ByteType> Unpin for OffsetLog<ByteType>where
ByteType: Unpin,
impl<ByteType> UnwindSafe for OffsetLog<ByteType>where
ByteType: UnwindSafe,
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