pub struct EncodedFragment {
pub id: String,
pub chunk_id: String,
pub k: usize,
pub coding_vector: Vec<u8>,
pub data: Vec<u8>,
}Expand description
A single RLNC-encoded fragment of a chunk.
Can be stored on disk, transmitted over the network, or used as input to
recode to generate additional fragments without decoding.
Fields§
§id: StringRandom UUID assigned at creation (encoding or recoding).
chunk_id: StringBLAKE3 hash of the original chunk, hex-encoded (first 16 chars = 64 bits). Used as the key in the fragment store and for integrity verification.
k: usizeNumber of source symbols k this fragment was derived from.
coding_vector: Vec<u8>Coefficients over GF(2⁸): one per source symbol.
Length == k.
data: Vec<u8>Linear combination of source symbols over GF(2⁸).
Length == symbol_size (chunk_size / k, padded).
Implementations§
Trait Implementations§
Source§impl Clone for EncodedFragment
impl Clone for EncodedFragment
Source§fn clone(&self) -> EncodedFragment
fn clone(&self) -> EncodedFragment
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 EncodedFragment
impl Debug for EncodedFragment
Source§impl<'de> Deserialize<'de> for EncodedFragment
impl<'de> Deserialize<'de> for EncodedFragment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncodedFragment
impl RefUnwindSafe for EncodedFragment
impl Send for EncodedFragment
impl Sync for EncodedFragment
impl Unpin for EncodedFragment
impl UnwindSafe for EncodedFragment
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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