Struct AuthorizationCallbacks

Source
#[repr(C)]
pub struct AuthorizationCallbacks {
Show 16 fields pub version: u32, pub SetResult: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationResult) -> i32, pub RequestInterrupt: unsafe extern "C-unwind" fn(AuthorizationEngineRef) -> i32, pub DidDeactivate: unsafe extern "C-unwind" fn(AuthorizationEngineRef) -> i32, pub GetContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut AuthorizationContextFlags, *mut *const AuthorizationValue) -> i32, pub SetContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, AuthorizationContextFlags, NonNull<AuthorizationValue>) -> i32, pub GetHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut *const AuthorizationValue) -> i32, pub SetHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, NonNull<AuthorizationValue>) -> i32, pub GetArguments: unsafe extern "C-unwind" fn(AuthorizationEngineRef, NonNull<*const AuthorizationValueVector>) -> i32, pub GetSessionId: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut AuthorizationSessionId) -> i32, pub GetImmutableHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut *const AuthorizationValue) -> i32, pub GetLAContext: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut *const CFType) -> i32, pub GetTokenIdentities: unsafe extern "C-unwind" fn(AuthorizationEngineRef, NonNull<CFType>, *mut *const CFArray) -> i32, pub GetTKTokenWatcher: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut *const CFType) -> i32, pub RemoveHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString) -> i32, pub RemoveContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString) -> i32,
}
Available on crate features Authorization and AuthorizationPlugin only.
Expand description

Callback API provided by the AuthorizationEngine.

Field: version Engine callback version. Field: SetResult Set a result after a call to AuthorizationSessionInvoke. Field: RequestInterrupt Request authorization engine to interrupt all mechamisms invoked after this mechamism has called SessionSetResult and then call AuthorizationSessionInvoke again. Field: DidDeactivate Respond to the Deactivate request. Field: GetContextValue Read value from context. AuthorizationValue does not own data. Field: SetContextValue Write value to context. AuthorizationValue and data are copied. Field: GetHintValue Read value from hints. AuthorizationValue does not own data. Field: SetHintValue Write value to hints. AuthorizationValue and data are copied. Field: GetArguments Read arguments passed. AuthorizationValueVector does not own data. Field: GetSessionId Read SessionId. Field: GetLAContext Returns LAContext which will have LACredentialCTKPIN credential set if PIN is available otherwise context without credentials is returned. LAContext can be used for operations with Tokens which would normally require PIN. Caller owns returned context and is responsible for release. Field: GetTokenIdentities Returns array of identities. Caller owns returned array and is reponsible for release. Field: GetTKTokenWatcher Returns TKTokenWatcher object. Caller owns returned context and is responsible for release. Field: RemoveContextValue Removes value from context. Field: RemoveHintValue Removes value from hints.

See also Apple’s documentation

Fields§

§version: u32§SetResult: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationResult) -> i32§RequestInterrupt: unsafe extern "C-unwind" fn(AuthorizationEngineRef) -> i32§DidDeactivate: unsafe extern "C-unwind" fn(AuthorizationEngineRef) -> i32§GetContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut AuthorizationContextFlags, *mut *const AuthorizationValue) -> i32§SetContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, AuthorizationContextFlags, NonNull<AuthorizationValue>) -> i32§GetHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut *const AuthorizationValue) -> i32§SetHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, NonNull<AuthorizationValue>) -> i32§GetArguments: unsafe extern "C-unwind" fn(AuthorizationEngineRef, NonNull<*const AuthorizationValueVector>) -> i32§GetSessionId: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut AuthorizationSessionId) -> i32§GetImmutableHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString, *mut *const AuthorizationValue) -> i32§GetLAContext: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut *const CFType) -> i32§GetTokenIdentities: unsafe extern "C-unwind" fn(AuthorizationEngineRef, NonNull<CFType>, *mut *const CFArray) -> i32§GetTKTokenWatcher: unsafe extern "C-unwind" fn(AuthorizationEngineRef, *mut *const CFType) -> i32§RemoveHintValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString) -> i32§RemoveContextValue: unsafe extern "C-unwind" fn(AuthorizationEngineRef, AuthorizationString) -> i32

Trait Implementations§

Source§

impl Clone for AuthorizationCallbacks

Source§

fn clone(&self) -> AuthorizationCallbacks

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuthorizationCallbacks

Source§

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

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

impl Encode for AuthorizationCallbacks

Available on crate feature objc2 only.
Source§

const ENCODING: Encoding

The Objective-C type-encoding for this type.
Source§

impl PartialEq for AuthorizationCallbacks

Source§

fn eq(&self, other: &AuthorizationCallbacks) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RefEncode for AuthorizationCallbacks

Available on crate feature objc2 only.
Source§

const ENCODING_REF: Encoding

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

impl Copy for AuthorizationCallbacks

Source§

impl StructuralPartialEq for AuthorizationCallbacks

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EncodeArgument for T
where T: Encode,

Source§

const ENCODING_ARGUMENT: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> EncodeReturn for T
where T: Encode,

Source§

const ENCODING_RETURN: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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,