[go: up one dir, main page]

Struct der::SetOfRef[][src]

pub struct SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
{ /* fields omitted */ }
Expand description

ASN.1 SET OF backed by a byte slice containing serialized DER.

Implementations

impl<'a, T> SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

pub fn new(slice: &'a [u8]) -> Result<Self>[src]

Create a new SetOfRef from a slice.

pub fn as_bytes(&self) -> &'a [u8][src]

Borrow the inner byte sequence.

Trait Implementations

impl<'a, T> AsRef<[u8]> for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn as_ref(&self) -> &[u8][src]

Performs the conversion.

impl<'a, T: Clone> Clone for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn clone(&self) -> SetOfRef<'a, T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a, T: Debug> Debug for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a, T> Encodable for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn encoded_len(&self) -> Result<Length>[src]

Compute the length of this value in bytes when encoded as ASN.1 DER.

fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]

Encode this value as ASN.1 DER using the provided Encoder.

fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]

Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more

fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>[src]

This is supported on crate feature alloc only.

Encode this message as ASN.1 DER, appending it to the provided byte vector. Read more

fn to_vec(&self) -> Result<Vec<u8>>[src]

This is supported on crate feature alloc only.

Serialize this message as a byte vector.

impl<'a, T> From<SetOfRef<'a, T>> for Any<'a> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn from(set: SetOfRef<'a, T>) -> Any<'a>[src]

Performs the conversion.

impl<'a, T: PartialEq> PartialEq<SetOfRef<'a, T>> for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

fn eq(&self, other: &SetOfRef<'a, T>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &SetOfRef<'a, T>) -> bool[src]

This method tests for !=.

impl<'a, 'b, T> SetOf<'a, 'b, T> for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

type Iter = SetOfRefIter<'a, T>

Iterator over the elements of the set. Read more

fn elements(&'b self) -> Self::Iter[src]

Iterate over the elements of the set.

impl<'a, T> Tagged for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

const TAG: Tag[src]

ASN.1 tag

impl<'a, T> TryFrom<Any<'a>> for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(any: Any<'a>) -> Result<Self>[src]

Performs the conversion.

impl<'a, T: Copy> Copy for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

impl<'a, T: Eq> Eq for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

impl<'a, T> StructuralEq for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

impl<'a, T> StructuralPartialEq for SetOfRef<'a, T> where
    T: Clone + Decodable<'a> + Encodable + Ord
[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for SetOfRef<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for SetOfRef<'a, T> where
    T: Send

impl<'a, T> Sync for SetOfRef<'a, T> where
    T: Sync

impl<'a, T> Unpin for SetOfRef<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for SetOfRef<'a, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.