Struct memmap::MmapViewSync [] [src]

pub struct MmapViewSync { /* fields omitted */ }

A thread-safe view of a memory map.

The view may be split into disjoint ranges, each of which will share the underlying memory map.

Methods

impl MmapViewSync
[src]

Split the view into disjoint pieces at the specified offset.

The provided offset must be less than the view's length.

Restricts the range of this view to the provided offset and length.

The provided range must be a subset of the current range (offset + len < view.len()).

Flushes outstanding view modifications to disk.

When this returns with a non-error result, all outstanding changes to a file-backed memory map view are guaranteed to be durably stored. The file's metadata (including last modification timestamp) may not be updated.

Asynchronously flushes outstanding memory map view modifications to disk.

This method initiates flushing modified pages to durable storage, but it will not wait for the operation to complete before returning. The file's metadata (including last modification timestamp) may not be updated.

Returns the length of the memory map view.

Returns a shared pointer to the mapped memory.

See Mmap::as_slice for invariants that must hold when dereferencing the pointer.

Returns a mutable pointer to the mapped memory.

See Mmap::as_mut_slice for invariants that must hold when dereferencing the pointer.

Returns the memory mapped file as an immutable slice.

Unsafety

The caller must ensure that the file is not concurrently modified.

Returns the memory mapped file as a mutable slice.

Unsafety

The caller must ensure that the file is not concurrently accessed.

Clones the view of the memory map.

The underlying memory map is shared, and thus the caller must ensure that the memory underlying the view is not illegally aliased.

Trait Implementations

impl Debug for MmapViewSync
[src]

Formats the value using the given formatter.

impl Sync for MmapViewSync
[src]

impl Send for MmapViewSync
[src]