pub struct PassthroughCandidate<'a> { /* private fields */ }Expand description
A borrowed compressed frame/tile that may be copied unchanged.
Implementations§
Source§impl<'a> PassthroughCandidate<'a>
impl<'a> PassthroughCandidate<'a>
Sourcepub const fn new(
bytes: &'a [u8],
transfer_syntax: CompressedTransferSyntax,
payload_kind: CompressedPayloadKind,
info: Info,
) -> PassthroughCandidate<'a>
pub const fn new( bytes: &'a [u8], transfer_syntax: CompressedTransferSyntax, payload_kind: CompressedPayloadKind, info: Info, ) -> PassthroughCandidate<'a>
Construct a candidate from already-inspected compressed bytes.
Sourcepub const fn bytes(&self) -> &'a [u8] ⓘ
pub const fn bytes(&self) -> &'a [u8] ⓘ
Original compressed bytes. A successful passthrough decision returns this exact slice.
Sourcepub const fn transfer_syntax(&self) -> CompressedTransferSyntax
pub const fn transfer_syntax(&self) -> CompressedTransferSyntax
Source compressed syntax.
Sourcepub const fn payload_kind(&self) -> CompressedPayloadKind
pub const fn payload_kind(&self) -> CompressedPayloadKind
Source payload/container shape.
Sourcepub fn evaluate(
&self,
requirements: &PassthroughRequirements,
) -> PassthroughDecision<'a>
pub fn evaluate( &self, requirements: &PassthroughRequirements, ) -> PassthroughDecision<'a>
Evaluate whether this candidate can be copied unchanged into a destination with the supplied requirements.
Sourcepub fn copy_bytes_if_eligible(
&self,
requirements: &PassthroughRequirements,
) -> Result<&'a [u8], PassthroughRejectReason>
pub fn copy_bytes_if_eligible( &self, requirements: &PassthroughRequirements, ) -> Result<&'a [u8], PassthroughRejectReason>
Return the original compressed bytes only when passthrough is legal.
Trait Implementations§
Source§impl<'a> Clone for PassthroughCandidate<'a>
impl<'a> Clone for PassthroughCandidate<'a>
Source§fn clone(&self) -> PassthroughCandidate<'a>
fn clone(&self) -> PassthroughCandidate<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PassthroughCandidate<'a>
impl<'a> Debug for PassthroughCandidate<'a>
impl<'a> Eq for PassthroughCandidate<'a>
Source§impl<'a> PartialEq for PassthroughCandidate<'a>
impl<'a> PartialEq for PassthroughCandidate<'a>
Source§fn eq(&self, other: &PassthroughCandidate<'a>) -> bool
fn eq(&self, other: &PassthroughCandidate<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for PassthroughCandidate<'a>
Auto Trait Implementations§
impl<'a> Freeze for PassthroughCandidate<'a>
impl<'a> RefUnwindSafe for PassthroughCandidate<'a>
impl<'a> Send for PassthroughCandidate<'a>
impl<'a> Sync for PassthroughCandidate<'a>
impl<'a> Unpin for PassthroughCandidate<'a>
impl<'a> UnsafeUnpin for PassthroughCandidate<'a>
impl<'a> UnwindSafe for PassthroughCandidate<'a>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more