Struct ed25519_dalek::pkcs8::spki::der::asn1::SequenceOf
pub struct SequenceOf<T, const N: usize> { /* private fields */ }
Available on crate feature
pkcs8
only.Expand description
ASN.1 SEQUENCE OF
backed by an array.
This type implements an append-only SEQUENCE OF
type which is stack-based
and does not depend on alloc
support.
Implementations§
§impl<T, const N: usize> SequenceOf<T, N>
impl<T, const N: usize> SequenceOf<T, N>
pub fn new() -> SequenceOf<T, N>
pub fn new() -> SequenceOf<T, N>
Create a new SequenceOf
.
pub fn add(&mut self, element: T) -> Result<(), Error>
pub fn add(&mut self, element: T) -> Result<(), Error>
Add an element to this SequenceOf
.
pub fn get(&self, index: usize) -> Option<&T>
pub fn get(&self, index: usize) -> Option<&T>
Get an element of this SequenceOf
.
pub fn iter(&self) -> SequenceOfIter<'_, T> ⓘ
pub fn iter(&self) -> SequenceOfIter<'_, T> ⓘ
Iterate over the elements in this SequenceOf
.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Is this SequenceOf
empty?
pub fn len(&self) -> usize
pub fn len(&self) -> usize
Number of elements in this SequenceOf
.
Trait Implementations§
§impl<T, const N: usize> Clone for SequenceOf<T, N>where
T: Clone,
impl<T, const N: usize> Clone for SequenceOf<T, N>where
T: Clone,
§fn clone(&self) -> SequenceOf<T, N>
fn clone(&self) -> SequenceOf<T, N>
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 more§impl<T, const N: usize> Debug for SequenceOf<T, N>where
T: Debug,
impl<T, const N: usize> Debug for SequenceOf<T, N>where
T: Debug,
§impl<'a, T, const N: usize> DecodeValue<'a> for SequenceOf<T, N>where
T: Decode<'a>,
impl<'a, T, const N: usize> DecodeValue<'a> for SequenceOf<T, N>where
T: Decode<'a>,
§fn decode_value<R>(
reader: &mut R,
header: Header
) -> Result<SequenceOf<T, N>, Error>where
R: Reader<'a>,
fn decode_value<R>(
reader: &mut R,
header: Header
) -> Result<SequenceOf<T, N>, Error>where
R: Reader<'a>,
Attempt to decode this message using the provided
Reader
.§impl<T, const N: usize> Default for SequenceOf<T, N>
impl<T, const N: usize> Default for SequenceOf<T, N>
§fn default() -> SequenceOf<T, N>
fn default() -> SequenceOf<T, N>
Returns the “default value” for a type. Read more
§impl<T, const N: usize> EncodeValue for SequenceOf<T, N>where
T: Encode,
impl<T, const N: usize> EncodeValue for SequenceOf<T, N>where
T: Encode,
§impl<T, const N: usize> PartialEq for SequenceOf<T, N>where
T: PartialEq,
impl<T, const N: usize> PartialEq for SequenceOf<T, N>where
T: PartialEq,
§fn eq(&self, other: &SequenceOf<T, N>) -> bool
fn eq(&self, other: &SequenceOf<T, N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<T, const N: usize> ValueOrd for SequenceOf<T, N>where
T: DerOrd,
impl<T, const N: usize> ValueOrd for SequenceOf<T, N>where
T: DerOrd,
impl<T, const N: usize> Eq for SequenceOf<T, N>where
T: Eq,
impl<T, const N: usize> StructuralPartialEq for SequenceOf<T, N>
Auto Trait Implementations§
impl<T, const N: usize> RefUnwindSafe for SequenceOf<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for SequenceOf<T, N>where
T: Send,
impl<T, const N: usize> Sync for SequenceOf<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for SequenceOf<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for SequenceOf<T, N>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
§impl<'a, T> Choice<'a> for T
impl<'a, T> Choice<'a> for T
§fn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided
Tag
decodable as a variant of this CHOICE
?§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
§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.