pub struct PieceControl {
pub sequence: TempSeq,
pub session_id: TempSeq,
pub chunk: ChunkId,
pub command: PieceControlCommand,
pub max_index: Option<u32>,
pub lost_index: Option<Vec<Range<u32>>>,
}Fields
sequence: TempSeqsession_id: TempSeqchunk: ChunkIdcommand: PieceControlCommandmax_index: Option<u32>lost_index: Option<Vec<Range<u32>>>Implementations
sourceimpl PieceControl
impl PieceControl
pub fn split_send(self, tunnel: &DynamicTunnel) -> BuckyResult<()>
Trait Implementations
sourceimpl Debug for PieceControl
impl Debug for PieceControl
sourceimpl<'de> RawDecode<'de> for PieceControl
impl<'de> RawDecode<'de> for PieceControl
fn raw_decode(buf: &'de [u8]) -> BuckyResult<(Self, &'de [u8])>
fn raw_decode_with_option(
buf: &'de [u8],
_opt: &RawDecodeOption
) -> Result<(Self, &'de [u8]), BuckyError>
sourceimpl RawEncode for PieceControl
impl RawEncode for PieceControl
fn raw_measure(&self, _purpose: &Option<RawEncodePurpose>) -> BuckyResult<usize>
fn raw_encode<'a>(
&self,
enc_buf: &'a mut [u8],
_purpose: &Option<RawEncodePurpose>
) -> BuckyResult<&'a mut [u8]>
fn raw_tail_encode(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> Result<&'a [u8], BuckyError>
fn raw_encode_to_buffer(&self) -> Result<Vec<u8, Global>, 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, Global>, BuckyError>
Auto Trait Implementations
impl RefUnwindSafe for PieceControl
impl Send for PieceControl
impl Sync for PieceControl
impl Unpin for PieceControl
impl UnwindSafe for PieceControl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more