pub struct FloorPrefixDecoder {
pub key: KeyId,
pub first: Slot,
/* private fields */
}Expand description
Incremental clear-prefix decoder. Supply one bounded copy piece at a time.
Fields§
§key: KeyIdStore key sealing the floor stream.
first: SlotFirst kept slot; guides key discovery until the floor authenticates.
Implementations§
Source§impl FloorPrefixDecoder
impl FloorPrefixDecoder
Sourcepub const HEADER_LENGTH: usize = 31
pub const HEADER_LENGTH: usize = 31
Exact initial routing length, before copy pieces.
Sourcepub fn start(bytes: &[u8]) -> Result<Self, Error>
pub fn start(bytes: &[u8]) -> Result<Self, Error>
Read exactly the initial routing and bounded copy count.
Sourcepub fn remaining(&self) -> u32
pub fn remaining(&self) -> u32
Number of copy pieces still needed, before the encrypted body begins.
Sourcepub fn copy_length(&self, bytes: &[u8]) -> Result<usize, Error>
pub fn copy_length(&self, bytes: &[u8]) -> Result<usize, Error>
Bound one copy’s slot and length fields before allocating its body.
Auto Trait Implementations§
impl Freeze for FloorPrefixDecoder
impl RefUnwindSafe for FloorPrefixDecoder
impl Send for FloorPrefixDecoder
impl Sync for FloorPrefixDecoder
impl Unpin for FloorPrefixDecoder
impl UnsafeUnpin for FloorPrefixDecoder
impl UnwindSafe for FloorPrefixDecoder
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