pub struct TokenChannelPlan {
pub kinds: Vec<u8>,
pub lengths: Vec<u32>,
pub payloads: Vec<Vec<u8>>,
}Expand description
A typed transposition of a byte stream into parallel channels.
The three views are aligned: kinds[i] and lengths[i] describe token i,
while payloads[kinds[i]] holds that token’s bytes at the position determined
by the running total of preceding tokens of the same kind.
Fields§
§kinds: Vec<u8>One kind id per token, in file order.
lengths: Vec<u32>Byte length of each token, aligned with kinds.
payloads: Vec<Vec<u8>>payloads[k] is the concatenation of the bytes of every token of kind k,
in file order.
Implementations§
Trait Implementations§
Source§impl Clone for TokenChannelPlan
impl Clone for TokenChannelPlan
Source§impl Debug for TokenChannelPlan
impl Debug for TokenChannelPlan
Source§impl Default for TokenChannelPlan
impl Default for TokenChannelPlan
impl Eq for TokenChannelPlan
Source§impl PartialEq for TokenChannelPlan
impl PartialEq for TokenChannelPlan
impl StructuralPartialEq for TokenChannelPlan
Auto Trait Implementations§
impl Freeze for TokenChannelPlan
impl RefUnwindSafe for TokenChannelPlan
impl Send for TokenChannelPlan
impl Sync for TokenChannelPlan
impl Unpin for TokenChannelPlan
impl UnsafeUnpin for TokenChannelPlan
impl UnwindSafe for TokenChannelPlan
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