pub struct StoragePartialDecoder { /* private fields */ }Expand description
A ReadableStorage store value partial decoder.
Implementations§
Source§impl StoragePartialDecoder
impl StoragePartialDecoder
Sourcepub fn new(
storage: Arc<dyn ReadableStorageTraits>,
key: StoreKey,
) -> StoragePartialDecoder
pub fn new( storage: Arc<dyn ReadableStorageTraits>, key: StoreKey, ) -> StoragePartialDecoder
Create a new storage partial decoder.
Trait Implementations§
Source§impl BytesPartialDecoderTraits for StoragePartialDecoder
impl BytesPartialDecoderTraits for StoragePartialDecoder
Source§fn size_held(&self) -> usize
fn size_held(&self) -> usize
Returns the size of chunk bytes held by the partial decoder. Read more
Source§fn partial_decode_many(
&self,
decoded_regions: Box<dyn MaybeSendByteRangeIterator<Item = ByteRange> + '_>,
_options: &CodecOptions,
) -> Result<Option<Vec<Cow<'_, [u8]>>>, CodecError>
fn partial_decode_many( &self, decoded_regions: Box<dyn MaybeSendByteRangeIterator<Item = ByteRange> + '_>, _options: &CodecOptions, ) -> Result<Option<Vec<Cow<'_, [u8]>>>, CodecError>
Partially decode byte ranges. Read more
Source§fn supports_partial_decode(&self) -> bool
fn supports_partial_decode(&self) -> bool
Returns whether this decoder supports partial decoding. Read more
Source§fn partial_decode(
&self,
decoded_region: ByteRange,
options: &CodecOptions,
) -> Result<Option<Cow<'_, [u8]>>, CodecError>
fn partial_decode( &self, decoded_region: ByteRange, options: &CodecOptions, ) -> Result<Option<Cow<'_, [u8]>>, CodecError>
Partially decode a byte range. Read more
Source§fn decode(
&self,
options: &CodecOptions,
) -> Result<Option<Cow<'_, [u8]>>, CodecError>
fn decode( &self, options: &CodecOptions, ) -> Result<Option<Cow<'_, [u8]>>, CodecError>
Decode all bytes. Read more
Auto Trait Implementations§
impl Freeze for StoragePartialDecoder
impl Send for StoragePartialDecoder
impl Sync for StoragePartialDecoder
impl !RefUnwindSafe for StoragePartialDecoder
impl Unpin for StoragePartialDecoder
impl UnsafeUnpin for StoragePartialDecoder
impl !UnwindSafe for StoragePartialDecoder
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