pub struct SecretVLByteVec(/* private fields */);Available on crate feature
std only.Expand description
A wrapper struct around VLByteVec that implements ZeroizeOnDrop.
It behaves just like VLByteVec, except that it doesn’t allow
conversion into a Vec<u8>.
Like VLByteVec, SecretVLByteVec produces a different serde format
than the deprecated SecretVLBytes, but its Deserialize impl is
backwards-compatible: it accepts both its own native encoding and the
legacy SecretVLBytes encoding (a struct with a vec field
containing a sequence of u8) for self-describing serde formats.
Implementations§
Source§impl SecretVLByteVec
impl SecretVLByteVec
Sourcepub fn new(vec: Vec<u8>) -> Self
pub fn new(vec: Vec<u8>) -> Self
Generate a new variable-length byte vector that implements
ZeroizeOnDrop.
Trait Implementations§
Source§impl AsRef<[u8]> for SecretVLByteVec
impl AsRef<[u8]> for SecretVLByteVec
Source§impl Clone for SecretVLByteVec
impl Clone for SecretVLByteVec
Source§fn clone(&self) -> SecretVLByteVec
fn clone(&self) -> SecretVLByteVec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SecretVLByteVec
impl Debug for SecretVLByteVec
Source§impl Deserialize for SecretVLByteVec
impl Deserialize for SecretVLByteVec
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>where
Self: Sized,
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>where
Self: Sized,
This function deserializes the
bytes from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl<'de> Deserialize<'de> for SecretVLByteVec
impl<'de> Deserialize<'de> for SecretVLByteVec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DeserializeBytes for SecretVLByteVec
impl DeserializeBytes for SecretVLByteVec
Source§impl Drop for SecretVLByteVec
impl Drop for SecretVLByteVec
impl Eq for SecretVLByteVec
Source§impl From<&[u8]> for SecretVLByteVec
impl From<&[u8]> for SecretVLByteVec
Source§impl Hash for SecretVLByteVec
impl Hash for SecretVLByteVec
Source§impl Ord for SecretVLByteVec
impl Ord for SecretVLByteVec
Source§fn cmp(&self, other: &SecretVLByteVec) -> Ordering
fn cmp(&self, other: &SecretVLByteVec) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecretVLByteVec
impl PartialEq for SecretVLByteVec
Source§impl PartialOrd for SecretVLByteVec
impl PartialOrd for SecretVLByteVec
Source§impl Serialize for SecretVLByteVec
impl Serialize for SecretVLByteVec
Source§impl Serialize for SecretVLByteVec
impl Serialize for SecretVLByteVec
Source§impl Size for SecretVLByteVec
impl Size for SecretVLByteVec
fn tls_serialized_len(&self) -> usize
impl StructuralPartialEq for SecretVLByteVec
Source§impl Zeroize for SecretVLByteVec
impl Zeroize for SecretVLByteVec
impl ZeroizeOnDrop for SecretVLByteVec
Auto Trait Implementations§
impl Freeze for SecretVLByteVec
impl RefUnwindSafe for SecretVLByteVec
impl Send for SecretVLByteVec
impl Sync for SecretVLByteVec
impl Unpin for SecretVLByteVec
impl UnsafeUnpin for SecretVLByteVec
impl UnwindSafe for SecretVLByteVec
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