pub struct FloorFrames { /* private fields */ }Expand description
Incremental floor frame codec; no bound is imposed on the complete stream.
Implementations§
Source§impl FloorFrames
impl FloorFrames
Sourcepub fn start(header: FloorHeader) -> Result<(Self, Vec<u8>), Error>
pub fn start(header: FloorHeader) -> Result<(Self, Vec<u8>), Error>
Begin encoding with the validated floor header.
Sourcepub fn decode_header(bytes: &[u8], first: Slot) -> Result<Self, Error>
pub fn decode_header(bytes: &[u8], first: Slot) -> Result<Self, Error>
Start decoding from its initial header frame, checking the clear prefix.
Sourcepub fn header(&self) -> &FloorHeader
pub fn header(&self) -> &FloorHeader
Unauthenticated header; verify the floor before granting authority.
Sourcepub fn announcement(&mut self, slot: &OriginalSlot) -> Result<Vec<u8>, Error>
pub fn announcement(&mut self, slot: &OriginalSlot) -> Result<Vec<u8>, Error>
Encode the next original announcement, checking header order.
Sourcepub fn end(&mut self) -> Result<Vec<u8>, Error>
pub fn end(&mut self) -> Result<Vec<u8>, Error>
Encode the required end frame after all announcements.
Auto Trait Implementations§
impl Freeze for FloorFrames
impl RefUnwindSafe for FloorFrames
impl Send for FloorFrames
impl Sync for FloorFrames
impl Unpin for FloorFrames
impl UnsafeUnpin for FloorFrames
impl UnwindSafe for FloorFrames
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