Struct tls_codec::SecretVLBytes
source · pub struct SecretVLBytes(_);
Available on crate feature
std
only.Expand description
A wrapper struct around VLBytes
that implements ZeroizeOnDrop
. It
behaves just like VLBytes
, except that it doesn’t allow conversion into
a Vec<u8>
.
Implementations§
source§impl SecretVLBytes
impl SecretVLBytes
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 SecretVLBytes
impl AsRef<[u8]> for SecretVLBytes
source§impl Clone for SecretVLBytes
impl Clone for SecretVLBytes
source§fn clone(&self) -> SecretVLBytes
fn clone(&self) -> SecretVLBytes
Returns a copy 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 SecretVLBytes
impl Debug for SecretVLBytes
source§impl<'de> Deserialize<'de> for SecretVLBytes
impl<'de> Deserialize<'de> for SecretVLBytes
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 Deserialize for SecretVLBytes
impl Deserialize for SecretVLBytes
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 DeserializeBytes for SecretVLBytes
impl DeserializeBytes for SecretVLBytes
source§impl Drop for SecretVLBytes
impl Drop for SecretVLBytes
source§impl From<&[u8]> for SecretVLBytes
impl From<&[u8]> for SecretVLBytes
source§impl Hash for SecretVLBytes
impl Hash for SecretVLBytes
source§impl Ord for SecretVLBytes
impl Ord for SecretVLBytes
source§fn cmp(&self, other: &SecretVLBytes) -> Ordering
fn cmp(&self, other: &SecretVLBytes) -> Ordering
1.21.0 · 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<SecretVLBytes> for SecretVLBytes
impl PartialEq<SecretVLBytes> for SecretVLBytes
source§fn eq(&self, other: &SecretVLBytes) -> bool
fn eq(&self, other: &SecretVLBytes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SecretVLBytes> for SecretVLBytes
impl PartialOrd<SecretVLBytes> for SecretVLBytes
source§fn partial_cmp(&self, other: &SecretVLBytes) -> Option<Ordering>
fn partial_cmp(&self, other: &SecretVLBytes) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SecretVLBytes
impl Serialize for SecretVLBytes
source§impl Serialize for SecretVLBytes
impl Serialize for SecretVLBytes
source§impl Size for SecretVLBytes
impl Size for SecretVLBytes
fn tls_serialized_len(&self) -> usize
source§impl Zeroize for SecretVLBytes
impl Zeroize for SecretVLBytes
impl Eq for SecretVLBytes
impl StructuralEq for SecretVLBytes
impl StructuralPartialEq for SecretVLBytes
Auto Trait Implementations§
impl RefUnwindSafe for SecretVLBytes
impl Send for SecretVLBytes
impl Sync for SecretVLBytes
impl Unpin for SecretVLBytes
impl UnwindSafe for SecretVLBytes
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