TKTokenDelegate

Trait TKTokenDelegate 

Source
pub unsafe trait TKTokenDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn token_createSessionWithError(
        &self,
        token: &TKToken,
    ) -> Result<Retained<TKTokenSession>, Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn token_terminateSession(
        &self,
        token: &TKToken,
        session: &TKTokenSession,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature TKToken only.
Expand description

TKTokenDelegate contains operations implementing functionality of token class.

TKTokenDelegate represents protocol which must be implemented by token implementors’ class representing token. Apart from being able to identify itself with its unique identifier, and must be able to establish new TKTokenSession when requested.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn token_createSessionWithError( &self, token: &TKToken, ) -> Result<Retained<TKTokenSession>, Retained<NSError>>
where Self: Sized + Message,

Create new session instance

All operations with objects on the token are performed inside TKTokenSession which represent authentication context. This method is called whenever new authentication context is needed (typically when client application wants to perform token operation using keychain object which has associated LocalAuthentication LAContext which was not yet seen by this token instance).

Parameter token: Related token instance.

Source

unsafe fn token_terminateSession( &self, token: &TKToken, session: &TKTokenSession, )
where Self: Sized + Message,

Terminates previously created session, implementation should free all associated resources.

Parameter token: Related token instance.

Trait Implementations§

Source§

impl ProtocolType for dyn TKTokenDelegate

Source§

const NAME: &'static str = "TKTokenDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn TKTokenDelegate

Implementations on Foreign Types§

Source§

impl<T> TKTokenDelegate for ProtocolObject<T>
where T: ?Sized + TKTokenDelegate,

Implementors§