pub enum Segment<S: ExtendVec + 'static = Vec<u8>> {
Ref(SegmentRef),
Unknown(SegmentUnknown<S>),
}
Expand description
A segment of data corresponding to a multiple of Difference::block_size
.
Variants§
Ref(SegmentRef)
Reference to successive block(s) of data.
Unknown(SegmentUnknown<S>)
Data unknown to the one who sent the Signature
.
Implementations§
source§impl<S: ExtendVec> Segment<S>
impl<S: ExtendVec> Segment<S>
sourcepub fn reference(start: usize) -> Self
pub fn reference(start: usize) -> Self
Create a new Segment::Ref
from start
.
SegmentRef::block_count
is set to 1.