pub struct MmapReader { /* private fields */ }Expand description
Lector de archivos mapeados en memoria virtual (mmap) con costo cero de asignación inicial.
Implementations§
Source§impl MmapReader
impl MmapReader
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Abre un archivo binario y crea el mapeo de memoria virtual (mmap).
Tiempo de apertura $< 10\text{ ms}$ independientemente del tamaño del archivo.
Sourcepub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice(&self) -> &[u8] ⓘ
Obtiene una referencia inmutable a la totalidad del espacio de direcciones mapeado (cero-copia).
Trait Implementations§
Source§impl Clone for MmapReader
impl Clone for MmapReader
Source§fn clone(&self) -> MmapReader
fn clone(&self) -> MmapReader
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 moreAuto Trait Implementations§
impl Freeze for MmapReader
impl RefUnwindSafe for MmapReader
impl Send for MmapReader
impl Sync for MmapReader
impl Unpin for MmapReader
impl UnsafeUnpin for MmapReader
impl UnwindSafe for MmapReader
Blanket Implementations§
impl<T> Allocation for T
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,
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