pub struct Loader<R> {
pub width: usize,
pub height: usize,
/* private fields */
}Expand description
A struct that represents an image in the process of being loaded.
Fields§
§width: usizeThe width of the image, in pixels.
height: usizeThe height of the image, in pixels.
Implementations§
Source§impl<R: BufRead> Loader<R>
impl<R: BufRead> Loader<R>
Sourcepub fn new(reader: R) -> Result<Self, IoError>
pub fn new(reader: R) -> Result<Self, IoError>
Construct a new Loader. This will consume the header from the provided reader.
Sourcepub fn scanlines(self) -> ScanlinesLoader<R>
pub fn scanlines(self) -> ScanlinesLoader<R>
Convert this loader into an ScanlinesLoader, which lets you load the image one scanline at a time.
Auto Trait Implementations§
impl<R> Freeze for Loader<R>where
R: Freeze,
impl<R> RefUnwindSafe for Loader<R>where
R: RefUnwindSafe,
impl<R> Send for Loader<R>where
R: Send,
impl<R> Sync for Loader<R>where
R: Sync,
impl<R> Unpin for Loader<R>where
R: Unpin,
impl<R> UnwindSafe for Loader<R>where
R: 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