Skip to main content

TranscodeConvertErrorOf

Type Alias TranscodeConvertErrorOf 

Source
pub type TranscodeConvertErrorOf<D, E> = TranscodeConvertError<<D as Codec>::DecodeError, <E as Codec>::EncodeError, <D as Codec>::Value>;
Expand description

Convert transcode error for a codec-backed converter.

§Type Parameters

  • D: Source codec providing decode errors and the intermediate value type.
  • E: Target codec providing encode errors for the same value type.

Aliased Type§

pub enum TranscodeConvertErrorOf<D, E> {
    Failure(TranscodeFailure),
    DecodeDomain(TranscodeDomainError<<D as Codec>::DecodeError>),
    EncodeDomain(TranscodeDomainError<<E as Codec>::EncodeError>),
    Unencodable {
        input_index: usize,
        value: Option<<D as Codec>::Value>,
    },
}

Variants§

§

Failure(TranscodeFailure)

Framework-level transcode failure.

Tuple Fields

§0: TranscodeFailure

Framework contract, capacity, or lifecycle failure.

§

DecodeDomain(TranscodeDomainError<<D as Codec>::DecodeError>)

Source-side domain error.

Tuple Fields

§0: TranscodeDomainError<<D as Codec>::DecodeError>

Owned source error with its lifecycle phase and input context.

§

EncodeDomain(TranscodeDomainError<<E as Codec>::EncodeError>)

Target-side domain error.

Tuple Fields

§0: TranscodeDomainError<<E as Codec>::EncodeError>

Owned target error with its lifecycle phase and input context.

§

Unencodable

The decoded intermediate value cannot be encoded by the target codec and policy.

Fields

§input_index: usize

Absolute source input index of the value being encoded.

§value: Option<<D as Codec>::Value>

Some retains the decoded intermediate value; None means value context was unavailable or intentionally omitted.