pub struct ChunkStateList { /* private fields */ }
Implementations§
Source§impl ChunkStateList
impl ChunkStateList
pub fn new(desc: &ChunkListDesc) -> Self
pub fn len(&self) -> usize
pub fn start(&self) -> usize
pub fn range(&self) -> Range<usize>
pub fn state_of_index(&self, index: usize) -> Option<ChunkState>
pub fn state_of( &self, desc: &ChunkListDesc, chunk: &ChunkId, ) -> Option<ChunkState>
pub fn update_of( &mut self, desc: &ChunkListDesc, chunk: &ChunkId, state: ChunkState, ) -> Option<ChunkState>
pub fn update_index_of( &mut self, index: usize, state: ChunkState, ) -> Option<ChunkState>
pub fn range_of(&self, range: &Range<usize>) -> Self
pub fn update_range_of(&mut self, range: &Self) -> usize
pub fn is_range_ready(&self, range: &Range<usize>) -> Option<Self>
pub fn range_ready_count(&self, range: &Range<usize>) -> usize
Trait Implementations§
Source§impl Clone for ChunkStateList
impl Clone for ChunkStateList
Source§fn clone(&self) -> ChunkStateList
fn clone(&self) -> ChunkStateList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ChunkStateList
impl Debug for ChunkStateList
Source§impl Default for ChunkStateList
impl Default for ChunkStateList
Source§impl From<(usize, Vec<ChunkState>)> for ChunkStateList
impl From<(usize, Vec<ChunkState>)> for ChunkStateList
Source§impl<'de> RawDecode<'de> for ChunkStateList
impl<'de> RawDecode<'de> for ChunkStateList
fn raw_decode(buf: &'de [u8]) -> Result<(Self, &'de [u8]), BuckyError>
fn raw_decode_with_option( buf: &'de [u8], _opt: &RawDecodeOption, ) -> Result<(Self, &'de [u8]), BuckyError>
Source§impl RawEncode for ChunkStateList
impl RawEncode for ChunkStateList
fn raw_measure( &self, _purpose: &Option<RawEncodePurpose>, ) -> Result<usize, BuckyError>
fn raw_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> Result<&'a mut [u8], BuckyError>
fn raw_tail_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> Result<&'a [u8], BuckyError>
fn raw_encode_to_buffer(&self) -> Result<Vec<u8>, BuckyError>
fn raw_hash_value(&self) -> Result<HashValue, BuckyError>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> Result<Vec<u8>, BuckyError>
Auto Trait Implementations§
impl Freeze for ChunkStateList
impl RefUnwindSafe for ChunkStateList
impl Send for ChunkStateList
impl Sync for ChunkStateList
impl Unpin for ChunkStateList
impl UnwindSafe for ChunkStateList
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<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
fn decode_from_file( file: &Path, buf: &'de mut Vec<u8>, ) -> Result<(D, usize), BuckyError>
Source§impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
fn suggest_buffer_size(&self) -> Result<usize, BuckyError>
fn encode<'a>( &self, buf: &'a mut [u8], _is_compress: bool, ) -> Result<&'a mut [u8], BuckyError>
fn encode_to_writer( &self, writer: impl Write, is_compress: bool, ) -> Result<usize, BuckyError>
fn encode_to_file( &self, file: &Path, is_compress: bool, ) -> Result<usize, BuckyError>
fn encode_to_vec(&self, is_compress: bool) -> Result<Vec<u8>, BuckyError>
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