Skip to main content

ReferenceZcrDecoderConfig

Struct ReferenceZcrDecoderConfig 

Source
pub struct ReferenceZcrDecoderConfig;
Expand description

The reference decoder registered under the self-detecting ZCR_FORMAT instead of ImageFormat::Pnm.

Drop-in for ReferenceDecoderConfig on a CodecSet when you want set.decode(bytes) / set.probe(bytes) to detect the reference codec’s own bytes. Decode behavior is identical — only the registration format differs.

Trait Implementations§

Source§

impl Clone for ReferenceZcrDecoderConfig

Source§

fn clone(&self) -> ReferenceZcrDecoderConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReferenceZcrDecoderConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DecoderConfig for ReferenceZcrDecoderConfig

Source§

type Error = RefError

The codec-specific error type.
Source§

type Job<'a> = RefDecodeJob

Per-operation job type. Read more
Source§

fn formats() -> &'static [ImageFormat]

The image formats this decoder handles. Read more
Source§

fn supported_descriptors() -> &'static [PixelDescriptor]

Pixel formats this decoder can produce natively. Read more
Source§

fn capabilities() -> &'static DecodeCapabilities

Decoder capabilities (metadata support, cancellation, etc.). Read more
Source§

fn job<'a>(self) -> Self::Job<'a>

Create a per-operation job, consuming the config. Read more
Source§

fn estimate_decode_resources( &self, image: &ImageCharacteristics, compute: &ComputeEnvironment, ) -> ResourceEstimate

Predict peak memory, wall time, and CPU-core scaling for decoding an image with the given ImageCharacteristics on the compute environment. Read more
Source§

fn decode(self, data: &[u8]) -> Result<DecodeOutput, Self::Error>
where Self: Sized,

One-shot convenience: decode data to owned pixels in the decoder’s native pixel format, with default job settings. Read more
Source§

fn probe(&self, data: &[u8]) -> Result<ImageInfo, Self::Error>
where Self: Sized,

One-shot convenience: probe image metadata (header parse only, cheap) with default job settings. Read more
Source§

impl Default for ReferenceZcrDecoderConfig

Source§

fn default() -> ReferenceZcrDecoderConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<C> DynDecoderConfig for C
where C: DecoderConfig + 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Downcast to the concrete config type. Read more
Source§

fn formats(&self) -> &'static [ImageFormat]

The image formats this decoder handles.
Source§

fn supported_descriptors(&self) -> &'static [PixelDescriptor]

Pixel formats this decoder can produce natively.
Source§

fn capabilities(&self) -> &'static DecodeCapabilities

Decoder capabilities (metadata support, cancellation, etc.).
Source§

fn estimate_decode_resources( &self, image: &ImageCharacteristics, compute: &ComputeEnvironment, ) -> ResourceEstimate

Predict peak memory / time / core-scaling for decoding an image with the given image characteristics on compute (forwards to DecoderConfig::estimate_decode_resources).
Source§

fn dyn_job(&self) -> Box<dyn DynDecodeJob<'_> + '_>

Create a dyn-dispatched decode job.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.