sec_identity

Struct sec_identity 

Source
pub struct sec_identity { /* private fields */ }
Available on crate feature SecProtocolTypes only.
Expand description

Implementations§

Source§

impl sec_identity

Source

pub unsafe fn create(identity: &SecIdentity) -> sec_identity_t

Available on crate feature SecBase only.

Create an ARC-able sec_identity_t instance from a SecIdentityRef.

Parameter identity: A SecIdentityRef instance.

Returns: a sec_identity_t instance.

Source

pub unsafe fn create_with_certificates( identity: &SecIdentity, certificates: &CFArray, ) -> sec_identity_t

Available on crate feature SecBase only.

Create an ARC-able sec_identity_t instance from a SecIdentityRef and array of SecCertificateRef instances.

Parameter identity: A SecIdentityRef instance.

Parameter certificates: An array of SecCertificateRef instances.

Returns: a sec_identity_t instance.

§Safety

certificates generic must be of the correct type.

Source

pub unsafe fn access_certificates( identity: sec_identity_t, handler: &DynBlock<dyn Fn(sec_certificate_t)>, ) -> bool

Available on crate feature block2 only.

Access the certificates associated with the sec_identity_t instance.

Parameter identity: A sec_identity_t instance.

Parameter handler: A block to invoke one or more times with sec_certificate_t instances.

Returns: Returns true if the peer certificates were accessible, false otherwise.

§Safety

identity must be a valid pointer.

Source

pub unsafe fn ref(identity: sec_identity_t) -> Option<CFRetained<SecIdentity>>

Available on crate feature SecBase only.

Copy a retained reference to the underlying SecIdentityRef instance.

Parameter identity: A sec_identity_t instance.

Returns: The underlying SecIdentityRef instance.

§Safety

identity must be a valid pointer.

Source

pub unsafe fn certificates_ref( identity: sec_identity_t, ) -> Option<CFRetained<CFArray>>

Copy a retained reference to the underlying CFArrayRef container of SecCertificateRef types.

Parameter identity: A sec_identity_t instance.

Returns: The underlying CFArrayRef container with SecCertificateRef instances.

§Safety

identity must be a valid pointer.

Trait Implementations§

Source§

impl Debug for sec_identity

Source§

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

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

impl RefEncode for sec_identity

Available on crate feature objc2 only.
Source§

const ENCODING_REF: Encoding

The Objective-C type-encoding for a reference of this type. Read more

Auto Trait Implementations§

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<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.
Source§

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