Struct osmpbf::mmap_blob::Mmap[][src]

pub struct Mmap { /* fields omitted */ }
Expand description

A read-only memory map.

Implementations

Creates a memory map from a given file.

Safety

The underlying file should not be modified while holding the memory map. See memmap-rs issue 25 for more information on the safety of memory maps.

Example
use osmpbf::*;

let f = std::fs::File::open("tests/test.osm.pbf")?;
let mmap = unsafe { Mmap::from_file(&f)? };

Creates a memory map from a given path.

Safety

The underlying file should not be modified while holding the memory map. See memmap-rs issue 25 for more information on the safety of memory maps.

Example
use osmpbf::*;

let mmap = unsafe { Mmap::from_path("tests/test.osm.pbf")? };

Returns an iterator over the blobs in this memory map.

Trait Implementations

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

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.