pub enum Version {
V1 = 0,
V2 = 1,
}
Expand description
Version identifier for PKCS#8 documents.
(RFC 5958 designates 0
and 1
as the only valid versions for PKCS#8 documents)
Variants§
V1 = 0
Denotes PKCS#8 v1: no public key field.
V2 = 1
Denotes PKCS#8 v2: OneAsymmetricKey
with public key field.
Implementations§
Trait Implementations§
Source§impl Encode for Version
impl Encode for Version
Source§fn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut dyn Writer) -> Result<()>
fn encode(&self, writer: &mut dyn Writer) -> Result<()>
Encode this value as ASN.1 DER using the provided
Writer
.Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
impl Copy for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)