Struct netidx_archive::ArchiveReader [−][src]
pub struct ArchiveReader { /* fields omitted */ }
Implementations
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.
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
.
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.
Return a vector of all id/path pairs present in the archive. This may change if the archive is being written to.
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.
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
Auto Trait Implementations
impl !RefUnwindSafe for ArchiveReader
impl Send for ArchiveReader
impl Sync for ArchiveReader
impl Unpin for ArchiveReader
impl !UnwindSafe for ArchiveReader
Blanket Implementations
Mutably borrows from an owned value. Read more