pub struct ByteIntervalPartialDecoder { /* private fields */ }
Expand description
A partial decoder for a byte interval of a BytesPartialDecoderTraits
partial decoder.
Modifies byte range requests to a specific byte interval in an inner bytes partial decoder.
Implementations§
Source§impl ByteIntervalPartialDecoder
impl ByteIntervalPartialDecoder
Sourcepub fn new(
inner: Arc<dyn BytesPartialDecoderTraits>,
byte_offset: ByteOffset,
byte_length: ByteLength,
) -> Self
pub fn new( inner: Arc<dyn BytesPartialDecoderTraits>, byte_offset: ByteOffset, byte_length: ByteLength, ) -> Self
Create a new byte interval partial decoder.
Trait Implementations§
Source§impl BytesPartialDecoderTraits for ByteIntervalPartialDecoder
impl BytesPartialDecoderTraits for ByteIntervalPartialDecoder
Source§fn partial_decode(
&self,
byte_ranges: &[ByteRange],
options: &CodecOptions,
) -> Result<Option<Vec<RawBytes<'_>>>, CodecError>
fn partial_decode( &self, byte_ranges: &[ByteRange], options: &CodecOptions, ) -> Result<Option<Vec<RawBytes<'_>>>, CodecError>
Partially decode bytes. Read more
Source§fn partial_decode_concat(
&self,
decoded_regions: &[ByteRange],
options: &CodecOptions,
) -> Result<Option<RawBytes<'_>>, CodecError>
fn partial_decode_concat( &self, decoded_regions: &[ByteRange], options: &CodecOptions, ) -> Result<Option<RawBytes<'_>>, CodecError>
Partially decode bytes and concatenate. Read more
Source§fn decode(
&self,
options: &CodecOptions,
) -> Result<Option<RawBytes<'_>>, CodecError>
fn decode( &self, options: &CodecOptions, ) -> Result<Option<RawBytes<'_>>, CodecError>
Decode all bytes. Read more
Auto Trait Implementations§
impl Freeze for ByteIntervalPartialDecoder
impl !RefUnwindSafe for ByteIntervalPartialDecoder
impl Send for ByteIntervalPartialDecoder
impl Sync for ByteIntervalPartialDecoder
impl Unpin for ByteIntervalPartialDecoder
impl !UnwindSafe for ByteIntervalPartialDecoder
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> 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