#[non_exhaustive]pub enum UnsupportedOperation {
RowLevelEncode,
PullEncode,
AnimationEncode,
DecodeInto,
RowLevelDecode,
AnimationDecode,
PixelFormat,
MultiImageDecode,
}Expand description
Identifies an operation that a codec does not support.
Codecs include this in their error types (e.g. as a variant payload)
so callers can generically detect “this codec doesn’t support this
operation” without downcasting. See CodecErrorExt.
§Example
use zencodec::UnsupportedOperation;
let op = UnsupportedOperation::DecodeInto;
assert_eq!(format!("{op}"), "unsupported operation: decode_into");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RowLevelEncode
Encoder::push_rows() + finish() (row-level encode).
PullEncode
Encoder::encode_from() (pull-from-source encode).
AnimationEncode
All AnimationFrameEncoder methods (animation encoding).
DecodeInto
Decoder::decode_into() (decode into caller buffer).
RowLevelDecode
Decoder::decode_rows() (row-level decode).
AnimationDecode
All AnimationFrameDecoder methods (animation decoding).
PixelFormat
A specific pixel format is not supported.
MultiImageDecode
All MultiPageDecoder methods (multi-image decode).
Implementations§
Trait Implementations§
Source§impl Clone for UnsupportedOperation
impl Clone for UnsupportedOperation
Source§fn clone(&self) -> UnsupportedOperation
fn clone(&self) -> UnsupportedOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnsupportedOperation
impl Debug for UnsupportedOperation
Source§impl Display for UnsupportedOperation
impl Display for UnsupportedOperation
Source§impl Error for UnsupportedOperation
impl Error for UnsupportedOperation
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl Hash for UnsupportedOperation
impl Hash for UnsupportedOperation
Source§impl PartialEq for UnsupportedOperation
impl PartialEq for UnsupportedOperation
impl Copy for UnsupportedOperation
impl Eq for UnsupportedOperation
impl StructuralPartialEq for UnsupportedOperation
Auto Trait Implementations§
impl Freeze for UnsupportedOperation
impl RefUnwindSafe for UnsupportedOperation
impl Send for UnsupportedOperation
impl Sync for UnsupportedOperation
impl Unpin for UnsupportedOperation
impl UnsafeUnpin for UnsupportedOperation
impl UnwindSafe for UnsupportedOperation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
Source§fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
Find an
UnsupportedOperation in this error’s cause chain.Source§fn limit_exceeded(&self) -> Option<&LimitExceeded>
fn limit_exceeded(&self) -> Option<&LimitExceeded>
Find a
LimitExceeded in this error’s cause chain.