[−][src]Struct netidx_protocols::archive::ArchiveReader
Implementations
impl ArchiveReader
[src]
pub fn open(path: impl AsRef<FilePath>) -> Result<Self>
[src]
Open the specified archive read only. Note, it is possible to read and write to an archive simultaneously, however to do so you must open an ArchiveWriter and then use the ArchiveWriter::reader method to get a reader.
pub fn capacity(&self) -> usize
[src]
pub fn delta_batches(&self) -> usize
[src]
pub fn image_batches(&self) -> usize
[src]
pub fn id_for_path(&self, path: &Path) -> Option<Id>
[src]
pub fn path_for_id(&self, id: &Id) -> Option<Path>
[src]
pub fn check_remap_rescan(&self) -> Result<()>
[src]
Check if the memory map needs to be remapped due to growth,
and check if additional records exist that need to be
indexed. This method is only relevant if this ArchiveReader
was created from an ArchiveWriter
, this method is called
automatically by read_deltas
and build_image
.
pub fn seek(&self, cursor: &mut Cursor, seek: Seek)
[src]
Move the cursor according to the Seek
instruction. If the
cursor has no current position then positive offsets begin at
the cursor start, and negative offsets begin at the cursor
end. If the seek instruction would move the cursor out of
bounds, then it will move to the closest in bounds position.
pub fn get_index(&self) -> Pooled<Vec<(Id, Path)>>
[src]
Return a vector of all id/path pairs present in the archive. This may change if the archive is being written to.
pub fn build_image(&self, cursor: &Cursor) -> Result<Pooled<HashMap<Id, Event>>>
[src]
Builds an image corresponding to the state at the cursor, or if the cursor has no current position then at the beginning of the cursor. If the cursor has no position and then beginning is Unbounded, then the image will be empty. If there are no images in the archive, then all the deltas between the beginning and the cursor position will be read, otherwise only the deltas between the closest image that is older, and the cursor start need to be read.
pub fn read_deltas(
&self,
cursor: &mut Cursor,
n: usize
) -> Result<Pooled<VecDeque<(DateTime<Utc>, Pooled<Vec<BatchItem>>)>>>
[src]
&self,
cursor: &mut Cursor,
n: usize
) -> Result<Pooled<VecDeque<(DateTime<Utc>, Pooled<Vec<BatchItem>>)>>>
read at most n
delta items from the specified cursor, and
advance it by the number of items read. The cursor will not be
invalidated even if no items can be read, however depending on
it's bounds it may never read any more items.
Trait Implementations
impl Clone for ArchiveReader
[src]
pub fn clone(&self) -> ArchiveReader
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ArchiveReader
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ArchiveReader
[src]
impl Send for ArchiveReader
[src]
impl Sync for ArchiveReader
[src]
impl Unpin for ArchiveReader
[src]
impl !UnwindSafe for ArchiveReader
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,