Struct spng::Decoder [−][src]
PNG decoder
Implementations
impl<R> Decoder<R>
[src]
pub fn new(reader: R) -> Decoder<R>
[src]
Create a new png
decoder with the default limits
pub fn with_limits(self, limits: Limits) -> Decoder<R>
[src]
pub fn with_context_flags(self, context_flags: ContextFlags) -> Decoder<R>
[src]
pub fn with_decode_flags(self, decode_flags: DecodeFlags) -> Decoder<R>
[src]
pub fn with_output_format(self, output_format: Format) -> Decoder<R>
[src]
pub fn set_limits(&mut self, limits: Limits)
[src]
Set the limits
pub fn set_decode_flags(&mut self, decode_flags: DecodeFlags)
[src]
Set the decoding flags
pub fn set_output_format(&mut self, output_format: Format)
[src]
Set the output image format
pub fn set_context_flags(&mut self, context_flags: ContextFlags)
[src]
pub fn read_info(self) -> Result<(OutputInfo, Reader<R>), Error> where
R: Read,
[src]
R: Read,
Read the png
header and initialize decoding.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for Decoder<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for Decoder<R> where
R: Send,
R: Send,
impl<R> Sync for Decoder<R> where
R: Sync,
R: Sync,
impl<R> Unpin for Decoder<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Decoder<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,