pub struct Buffer<'a, T>(Cow<'a, [u8]>, PhantomData<T>);
Expand description
This is a buffer type for some data exposed by various APIs in this crate.
T
acts as a discriminant between different kinds of data.
The buffer will be zeroed on drop if it is owned.
Tuple Fields§
§0: Cow<'a, [u8]>
§1: PhantomData<T>
Implementations§
Trait Implementations§
Source§impl<'a> From<Buffer<'a, Curve25519SeedBinType>> for Curve25519SeedBin<'a>
impl<'a> From<Buffer<'a, Curve25519SeedBinType>> for Curve25519SeedBin<'a>
Source§fn from(value: Buffer<'a, Curve25519SeedBinType>) -> Self
fn from(value: Buffer<'a, Curve25519SeedBinType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, EcPrivateKeyBinType>> for EcPrivateKeyBin<'a>
impl<'a> From<Buffer<'a, EcPrivateKeyBinType>> for EcPrivateKeyBin<'a>
Source§fn from(value: Buffer<'a, EcPrivateKeyBinType>) -> Self
fn from(value: Buffer<'a, EcPrivateKeyBinType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, EcPrivateKeyRfc5915DerType>> for EcPrivateKeyRfc5915Der<'a>
impl<'a> From<Buffer<'a, EcPrivateKeyRfc5915DerType>> for EcPrivateKeyRfc5915Der<'a>
Source§fn from(value: Buffer<'a, EcPrivateKeyRfc5915DerType>) -> Self
fn from(value: Buffer<'a, EcPrivateKeyRfc5915DerType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, EcPublicKeyCompressedBinType>> for EcPublicKeyCompressedBin<'a>
impl<'a> From<Buffer<'a, EcPublicKeyCompressedBinType>> for EcPublicKeyCompressedBin<'a>
Source§fn from(value: Buffer<'a, EcPublicKeyCompressedBinType>) -> Self
fn from(value: Buffer<'a, EcPublicKeyCompressedBinType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, EcPublicKeyUncompressedBinType>> for EcPublicKeyUncompressedBin<'a>
impl<'a> From<Buffer<'a, EcPublicKeyUncompressedBinType>> for EcPublicKeyUncompressedBin<'a>
Source§fn from(value: Buffer<'a, EcPublicKeyUncompressedBinType>) -> Self
fn from(value: Buffer<'a, EcPublicKeyUncompressedBinType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, EncapsulationKeyBytesType>> for EncapsulationKeyBytes<'a>
impl<'a> From<Buffer<'a, EncapsulationKeyBytesType>> for EncapsulationKeyBytes<'a>
Source§fn from(value: Buffer<'a, EncapsulationKeyBytesType>) -> Self
fn from(value: Buffer<'a, EncapsulationKeyBytesType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, Pkcs8V1DerType>> for Pkcs8V1Der<'a>
impl<'a> From<Buffer<'a, Pkcs8V1DerType>> for Pkcs8V1Der<'a>
Source§fn from(value: Buffer<'a, Pkcs8V1DerType>) -> Self
fn from(value: Buffer<'a, Pkcs8V1DerType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, Pkcs8V2DerType>> for Pkcs8V2Der<'a>
impl<'a> From<Buffer<'a, Pkcs8V2DerType>> for Pkcs8V2Der<'a>
Source§fn from(value: Buffer<'a, Pkcs8V2DerType>) -> Self
fn from(value: Buffer<'a, Pkcs8V2DerType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, PqdsaPrivateKeyRawType>> for PqdsaPrivateKeyRaw<'a>
impl<'a> From<Buffer<'a, PqdsaPrivateKeyRawType>> for PqdsaPrivateKeyRaw<'a>
Source§fn from(value: Buffer<'a, PqdsaPrivateKeyRawType>) -> Self
fn from(value: Buffer<'a, PqdsaPrivateKeyRawType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, PqdsaSeedRawType>> for PqdsaSeedRaw<'a>
impl<'a> From<Buffer<'a, PqdsaSeedRawType>> for PqdsaSeedRaw<'a>
Source§fn from(value: Buffer<'a, PqdsaSeedRawType>) -> Self
fn from(value: Buffer<'a, PqdsaSeedRawType>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Buffer<'a, PublicKeyX509DerType>> for PublicKeyX509Der<'a>
impl<'a> From<Buffer<'a, PublicKeyX509DerType>> for PublicKeyX509Der<'a>
Source§fn from(value: Buffer<'a, PublicKeyX509DerType>) -> Self
fn from(value: Buffer<'a, PublicKeyX509DerType>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T> Freeze for Buffer<'a, T>
impl<'a, T> RefUnwindSafe for Buffer<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Buffer<'a, T>where
T: Send,
impl<'a, T> Sync for Buffer<'a, T>where
T: Sync,
impl<'a, T> Unpin for Buffer<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Buffer<'a, T>where
T: 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