pub struct ImageDecoderBuilder { /* private fields */ }Expand description
Builder for configuring and constructing an ImageDecoder.
Created by calling ImageDecoder::open(). Call build()
to open the file and prepare for decoding.
§Examples
ⓘ
use ff_decode::ImageDecoder;
let frame = ImageDecoder::open("photo.png").build()?.decode()?;
println!("{}x{}", frame.width(), frame.height());Implementations§
Source§impl ImageDecoderBuilder
impl ImageDecoderBuilder
Sourcepub fn build(self) -> Result<ImageDecoder, DecodeError>
pub fn build(self) -> Result<ImageDecoder, DecodeError>
Opens the image file and returns an ImageDecoder ready to decode.
§Errors
Returns DecodeError if the file cannot be opened, contains no
video stream, or uses an unsupported codec.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageDecoderBuilder
impl RefUnwindSafe for ImageDecoderBuilder
impl Send for ImageDecoderBuilder
impl Sync for ImageDecoderBuilder
impl Unpin for ImageDecoderBuilder
impl UnsafeUnpin for ImageDecoderBuilder
impl UnwindSafe for ImageDecoderBuilder
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