pub struct VPaddingCell {
pub payload: Vec<u8>,
}Expand description
Variable-length padding cell.
VPADDING cells are similar to PADDING cells but have variable length. They are used for traffic analysis resistance when variable-size padding is needed.
§Wire Format
Variable-size cell:
[ CircID (0) ][ 128 (VPADDING) ][ Length ][ Random Payload ]Fields§
§payload: Vec<u8>Random padding payload.
Implementations§
Source§impl VPaddingCell
impl VPaddingCell
Sourcepub fn new(size: usize) -> Self
pub fn new(size: usize) -> Self
Creates a new VPADDING cell with random payload of specified size.
§Arguments
size- Number of random bytes to generate
Sourcepub fn with_payload(payload: Vec<u8>) -> Self
pub fn with_payload(payload: Vec<u8>) -> Self
Trait Implementations§
Source§impl Clone for VPaddingCell
impl Clone for VPaddingCell
Source§fn clone(&self) -> VPaddingCell
fn clone(&self) -> VPaddingCell
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 VPaddingCell
impl Debug for VPaddingCell
Source§impl PartialEq for VPaddingCell
impl PartialEq for VPaddingCell
impl StructuralPartialEq for VPaddingCell
Auto Trait Implementations§
impl Freeze for VPaddingCell
impl RefUnwindSafe for VPaddingCell
impl Send for VPaddingCell
impl Sync for VPaddingCell
impl Unpin for VPaddingCell
impl UnwindSafe for VPaddingCell
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