Struct mozjpeg::decompress::DecompressBuilder
source · pub struct DecompressBuilder<'markers> { /* private fields */ }
Expand description
Use Decompress
static methods instead of creating this directly
Implementations§
source§impl<'markers> DecompressBuilder<'markers>
impl<'markers> DecompressBuilder<'markers>
pub const fn new() -> Self
pub fn with_err(self, err: ErrorMgr) -> Self
pub const fn with_markers(self, save_markers: &'markers [Marker]) -> Self
pub fn from_path<P: AsRef<Path>>( self, path: P ) -> Result<Decompress<BufReader<File>>>
sourcepub fn from_file(self, file: File) -> Result<Decompress<BufReader<File>>>
pub fn from_file(self, file: File) -> Result<Decompress<BufReader<File>>>
Reads from an already-open File
.
Use from_reader
if you want to customize buffer size.
sourcepub fn from_reader<R: BufRead>(self, reader: R) -> Result<Decompress<R>>
pub fn from_reader<R: BufRead>(self, reader: R) -> Result<Decompress<R>>
Takes BufReader
. If you have io::Read
, wrap it in io::BufReader::new(read)
.
Auto Trait Implementations§
impl<'markers> RefUnwindSafe for DecompressBuilder<'markers>
impl<'markers> !Send for DecompressBuilder<'markers>
impl<'markers> !Sync for DecompressBuilder<'markers>
impl<'markers> Unpin for DecompressBuilder<'markers>
impl<'markers> UnwindSafe for DecompressBuilder<'markers>
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