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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.