pub struct Unsupported<E>(/* private fields */);Expand description
Stub type for codecs that don’t support an operation.
Use as the associated type for unsupported decode modes:
ⓘ
impl<'a> DecodeJob<'a> for MyDecodeJob<'a> {
type Error = At<MyError>; // or just MyError
type Dec = MyDecoder<'a>;
type StreamDec = Unsupported<At<MyError>>;
type AnimationFrameDec = Unsupported<At<MyError>>;
// ...
fn streaming_decoder(self, ..) -> Result<Unsupported<At<MyError>>, At<MyError>> {
Err(MyError::from(UnsupportedOperation::RowLevelDecode).start_at())
}
fn animation_frame_decoder(self, ..) -> Result<Unsupported<At<MyError>>, At<MyError>> {
Err(MyError::from(UnsupportedOperation::AnimationDecode).start_at())
}
}The job’s method returns Err(...) before an Unsupported instance is
ever created, so the trait methods below are unreachable in practice.
Trait Implementations§
Source§impl<E: Error + Send + Sync + 'static> AnimationFrameDecoder for Unsupported<E>
impl<E: Error + Send + Sync + 'static> AnimationFrameDecoder for Unsupported<E>
Source§fn wrap_sink_error(_err: SinkError) -> E
fn wrap_sink_error(_err: SinkError) -> E
Source§fn render_next_frame(
&mut self,
_stop: Option<&dyn Stop>,
) -> Result<Option<AnimationFrame<'_>>, E>
fn render_next_frame( &mut self, _stop: Option<&dyn Stop>, ) -> Result<Option<AnimationFrame<'_>>, E>
Render the next composited full-canvas frame. Read more
Source§fn render_next_frame_owned(
&mut self,
_stop: Option<&dyn Stop>,
) -> Result<Option<OwnedAnimationFrame>, E>
fn render_next_frame_owned( &mut self, _stop: Option<&dyn Stop>, ) -> Result<Option<OwnedAnimationFrame>, E>
Render the next frame as an owned copy. Read more
Source§fn render_next_frame_to_sink(
&mut self,
_stop: Option<&dyn Stop>,
_sink: &mut dyn DecodeRowSink,
) -> Result<Option<OutputInfo>, E>
fn render_next_frame_to_sink( &mut self, _stop: Option<&dyn Stop>, _sink: &mut dyn DecodeRowSink, ) -> Result<Option<OutputInfo>, E>
Render the next frame directly into a caller-owned sink (push model). Read more
Source§fn frame_count(&self) -> Option<u32>
fn frame_count(&self) -> Option<u32>
Number of frames, if known without decoding.
Source§impl<E: Error + Send + Sync + 'static> StreamingDecode for Unsupported<E>
impl<E: Error + Send + Sync + 'static> StreamingDecode for Unsupported<E>
Auto Trait Implementations§
impl<E> Freeze for Unsupported<E>
impl<E> RefUnwindSafe for Unsupported<E>
impl<E> Send for Unsupported<E>
impl<E> Sync for Unsupported<E>
impl<E> Unpin for Unsupported<E>
impl<E> UnsafeUnpin for Unsupported<E>
impl<E> UnwindSafe for Unsupported<E>
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