Struct ConstPointer

Source
pub(crate) struct ConstPointer<'a, T> {
    ptr: *const T,
    _lifetime: PhantomData<&'a T>,
}

Fields§

§ptr: *const T§_lifetime: PhantomData<&'a T>

Implementations§

Source§

impl ConstPointer<'_, BIGNUM>

Source

pub(crate) fn to_be_bytes(&self) -> Vec<u8>

Source§

impl ConstPointer<'_, EVP_PKEY>

Source

pub(crate) fn validate_as_ed25519(&self) -> Result<(), KeyRejected>

Source

pub(crate) fn id(&self) -> i32

Source

pub(crate) fn key_size_bytes(&self) -> usize

Source

pub(crate) fn key_size_bits(&self) -> usize

Source

pub(crate) fn signature_size_bytes(&self) -> usize

Source

pub(crate) fn get_ec_key(&self) -> Result<ConstPointer<'_, EC_KEY>, KeyRejected>

Source

pub(crate) fn get_rsa(&self) -> Result<ConstPointer<'_, RSA>, KeyRejected>

Source

pub(crate) fn marshal_rfc5280_public_key(&self) -> Result<Vec<u8>, Unspecified>

Source

pub(crate) fn marshal_rfc5208_private_key( &self, version: Version, ) -> Result<Vec<u8>, Unspecified>

Source

pub(crate) fn marshal_raw_private_key(&self) -> Result<Vec<u8>, Unspecified>

Source

pub(crate) fn marshal_raw_private_to_buffer( &self, buffer: &mut [u8], ) -> Result<usize, Unspecified>

Source

pub(crate) fn marshal_raw_public_key(&self) -> Result<Vec<u8>, Unspecified>

Source

pub(crate) fn marshal_raw_public_to_buffer( &self, buffer: &mut [u8], ) -> Result<usize, Unspecified>

Source§

impl<T> ConstPointer<'static, T>

Source

pub unsafe fn new_static(ptr: *const T) -> Result<Self, ()>

Source§

impl<T> ConstPointer<'_, T>

Source

pub fn project_const_lifetime<'a, C>( &'a self, f: unsafe fn(&'a Self) -> *const C, ) -> Result<ConstPointer<'a, C>, ()>

Trait Implementations§

Source§

impl<'a, T: Debug> Debug for ConstPointer<'a, T>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T> Deref for ConstPointer<'_, T>

Source§

type Target = *const T

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<'a, P: Pointer> From<&'a ManagedPointer<P>> for ConstPointer<'a, P::T>

Source§

fn from(ptr: &'a ManagedPointer<P>) -> ConstPointer<'a, P::T>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a, T> Freeze for ConstPointer<'a, T>

§

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

§

impl<'a, T> !Send for ConstPointer<'a, T>

§

impl<'a, T> !Sync for ConstPointer<'a, T>

§

impl<'a, T> Unpin for ConstPointer<'a, T>

§

impl<'a, T> UnwindSafe for ConstPointer<'a, T>
where T: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.