Struct Der

struct Der<'a>(_)

DER-encoded data, either owned or borrowed

This wrapper type is used to represent DER-encoded data in a way that is agnostic to whether the data is owned (by a Vec<u8>) or borrowed (by a &[u8]). Support for the owned variant is only available when the alloc feature is enabled.

Implementations

impl<'a> Der<'a>

const fn from_slice(der: &'a [u8]) -> Self

A const constructor to create a Der from a borrowed slice

impl AsRef for Der<'_>

fn as_ref(self: &Self) -> &[u8]

impl Debug for Der<'_>

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

impl Deref for Der<'_>

fn deref(self: &Self) -> &<Self as >::Target

impl From for Der<'static>

fn from(vec: Vec<u8>) -> Self

impl<'a> Clone for Der<'a>

fn clone(self: &Self) -> Der<'a>

impl<'a> Eq for Der<'a>

impl<'a> Freeze for Der<'a>

impl<'a> From for Der<'a>

fn from(slice: &'a [u8]) -> Self

impl<'a> PartialEq for Der<'a>

fn eq(self: &Self, other: &Der<'a>) -> bool

impl<'a> RefUnwindSafe for Der<'a>

impl<'a> Send for Der<'a>

impl<'a> StructuralPartialEq for Der<'a>

impl<'a> Sync for Der<'a>

impl<'a> Unpin for Der<'a>

impl<'a> UnwindSafe for Der<'a>

impl<P, T> Receiver for Der<'a>

impl<T> Any for Der<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Der<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Der<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Der<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Der<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Der<'a>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Der<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Der<'a>

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

impl<T, U> TryInto for Der<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>