pub trait DynAnimationFrameDecoder: Send {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn into_any(self: Box<Self>) -> Box<dyn Any>;
fn info(&self) -> &ImageInfo;
fn frame_count(&self) -> Option<u32>;
fn loop_count(&self) -> Option<u32>;
fn render_next_frame_owned(
&mut self,
stop: Option<&dyn Stop>,
) -> Result<Option<OwnedAnimationFrame>, BoxedError>;
fn render_next_frame_to_sink(
&mut self,
stop: Option<&dyn Stop>,
sink: &mut dyn DecodeRowSink,
) -> Result<Option<OutputInfo>, BoxedError>;
}Expand description
Object-safe full-frame animation decoder.
Wraps AnimationFrameDecoder for dyn dispatch. Produced by
DynDecodeJob::into_animation_frame_decoder.
§Downcasting
Use as_any() to downcast back to the
concrete codec type for format-specific animation controls.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to the concrete frame decoder type (mutable).
Sourcefn into_any(self: Box<Self>) -> Box<dyn Any>
fn into_any(self: Box<Self>) -> Box<dyn Any>
Consume and downcast to the concrete frame decoder type.
Sourcefn frame_count(&self) -> Option<u32>
fn frame_count(&self) -> Option<u32>
Number of frames, if known without decoding.
Sourcefn loop_count(&self) -> Option<u32>
fn loop_count(&self) -> Option<u32>
Animation loop count from the container.
Sourcefn render_next_frame_owned(
&mut self,
stop: Option<&dyn Stop>,
) -> Result<Option<OwnedAnimationFrame>, BoxedError>
fn render_next_frame_owned( &mut self, stop: Option<&dyn Stop>, ) -> Result<Option<OwnedAnimationFrame>, BoxedError>
Render the next frame as an owned copy.
Sourcefn render_next_frame_to_sink(
&mut self,
stop: Option<&dyn Stop>,
sink: &mut dyn DecodeRowSink,
) -> Result<Option<OutputInfo>, BoxedError>
fn render_next_frame_to_sink( &mut self, stop: Option<&dyn Stop>, sink: &mut dyn DecodeRowSink, ) -> Result<Option<OutputInfo>, BoxedError>
Render the next frame directly into a caller-owned sink.