#[repr(C)]pub struct AuthorizationPluginInterface {
pub version: u32,
pub PluginDestroy: unsafe extern "C-unwind" fn(AuthorizationPluginRef) -> i32,
pub MechanismCreate: unsafe extern "C-unwind" fn(AuthorizationPluginRef, AuthorizationEngineRef, AuthorizationMechanismId, NonNull<AuthorizationMechanismRef>) -> i32,
pub MechanismInvoke: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32,
pub MechanismDeactivate: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32,
pub MechanismDestroy: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32,
}
Authorization
and AuthorizationPlugin
only.Expand description
Interface that must be implemented by each plugin.
Field: version Must be set to kAuthorizationPluginInterfaceVersion Field: PluginDestroy Plugin should clean up and release any resources it is holding. Field: MechanismCreate The plugin should create a mechanism named mechanismId. The mechanism needs to use the AuthorizationEngineRef for the callbacks and pass back a AuthorizationMechanismRef for itself. MechanismDestroy will be called when it is no longer needed. Field: MechanismInvoke Invoke an instance of a mechanism. It should call SetResult during or after returning from this function. Field: MechanismDeactivate Mechanism should respond with a DidDeactivate as soon as possible Field: MechanismDestroy Mechanism should clean up and release any resources it is holding
See also Apple’s documentation
Fields§
§version: u32
§PluginDestroy: unsafe extern "C-unwind" fn(AuthorizationPluginRef) -> i32
§MechanismCreate: unsafe extern "C-unwind" fn(AuthorizationPluginRef, AuthorizationEngineRef, AuthorizationMechanismId, NonNull<AuthorizationMechanismRef>) -> i32
§MechanismInvoke: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32
§MechanismDeactivate: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32
§MechanismDestroy: unsafe extern "C-unwind" fn(AuthorizationMechanismRef) -> i32
Trait Implementations§
Source§impl Clone for AuthorizationPluginInterface
impl Clone for AuthorizationPluginInterface
Source§fn clone(&self) -> AuthorizationPluginInterface
fn clone(&self) -> AuthorizationPluginInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AuthorizationPluginInterface
impl Debug for AuthorizationPluginInterface
Source§impl Encode for AuthorizationPluginInterface
Available on crate feature objc2
only.
impl Encode for AuthorizationPluginInterface
objc2
only.Source§impl PartialEq for AuthorizationPluginInterface
impl PartialEq for AuthorizationPluginInterface
Source§fn eq(&self, other: &AuthorizationPluginInterface) -> bool
fn eq(&self, other: &AuthorizationPluginInterface) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl RefEncode for AuthorizationPluginInterface
Available on crate feature objc2
only.
impl RefEncode for AuthorizationPluginInterface
objc2
only.