pub struct Mmap<T: Type> { /* private fields */ }
Expand description
Memory-mapped image data
Implementations§
Source§impl<T: Type> Mmap<T>
impl<T: Type> Mmap<T>
Sourcepub fn write_header<C: Color>(
file: impl Write,
meta: &Meta<T, C>,
) -> Result<(), Error>
pub fn write_header<C: Color>( file: impl Write, meta: &Meta<T, C>, ) -> Result<(), Error>
Write header to file
Sourcepub fn create<C: Color>(
filename: impl AsRef<Path>,
meta: &Meta<T, C>,
) -> Result<Self, Error>
pub fn create<C: Color>( filename: impl AsRef<Path>, meta: &Meta<T, C>, ) -> Result<Self, Error>
Create new Mmap
on disk
Sourcepub fn create_image<C: Color>(
filename: impl AsRef<Path>,
meta: &Meta<T, C>,
) -> Result<Image<T, C>, Error>
pub fn create_image<C: Color>( filename: impl AsRef<Path>, meta: &Meta<T, C>, ) -> Result<Image<T, C>, Error>
Create new image on disk
Sourcepub fn read_header<C: Color>(file: impl Read) -> Result<Meta<T, C>, Error>
pub fn read_header<C: Color>(file: impl Read) -> Result<Meta<T, C>, Error>
Read header from file on disk
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Mmap<T>
impl<T> RefUnwindSafe for Mmap<T>where
T: RefUnwindSafe,
impl<T> Send for Mmap<T>
impl<T> Sync for Mmap<T>
impl<T> Unpin for Mmap<T>
impl<T> UnwindSafe for Mmap<T>where
T: UnwindSafe,
Blanket Implementations§
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
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