pub struct MappedObjects {
mappings: Vec<Arc<Mmap>>,
}Expand description
Read-only file mappings, numbered in the order passed to Self::open.
Fields§
§mappings: Vec<Arc<Mmap>>Implementations§
Source§impl MappedObjects
impl MappedObjects
Sourcepub fn open<'a>(
paths: impl IntoIterator<Item = &'a Path>,
) -> Result<MappedObjects, Error>
pub fn open<'a>( paths: impl IntoIterator<Item = &'a Path>, ) -> Result<MappedObjects, Error>
Map files read-only, assigning object IDs from zero in iteration order. Files must remain unchanged while any returned mapping is alive.
Sourcepub fn mapping(&self, id: ObjectId) -> Result<&Mmap, Error>
pub fn mapping(&self, id: ObjectId) -> Result<&Mmap, Error>
Borrow an entire object mapping; fail if the object index is out of range. The caller must use IDs from this source.
Trait Implementations§
Source§impl ByteSource for MappedObjects
impl ByteSource for MappedObjects
Source§impl Clone for MappedObjects
impl Clone for MappedObjects
Source§fn clone(&self) -> MappedObjects
fn clone(&self) -> MappedObjects
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for MappedObjects
impl Default for MappedObjects
Source§fn default() -> MappedObjects
fn default() -> MappedObjects
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MappedObjects
impl RefUnwindSafe for MappedObjects
impl Send for MappedObjects
impl Sync for MappedObjects
impl Unpin for MappedObjects
impl UnsafeUnpin for MappedObjects
impl UnwindSafe for MappedObjects
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more