pub struct Batch { /* private fields */ }Implementations§
Source§impl Batch
impl Batch
Sourcepub fn push(&mut self, bytes: Vec<u8>) -> Result<bool, InvalidBatch>
pub fn push(&mut self, bytes: Vec<u8>) -> Result<bool, InvalidBatch>
False means the valid packet belongs in the next batch. The caller retains its durable ciphertext until receiver confirmation.
pub fn packets(&self) -> &[Vec<u8>]
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(bytes: &[u8]) -> Result<Self, InvalidBatch>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Batch
impl Freeze for Batch
impl Move for Batch
impl RefUnwindSafe for Batch
impl Send for Batchwhere
RawVecInner: Send,
impl Sync for Batchwhere
RawVecInner: Sync,
impl Unpin for Batch
impl UnsafeUnpin for Batch
impl UnwindSafe for Batchwhere
RawVecInner: UnwindSafe,
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