NFCVASReaderSessionDelegate

Trait NFCVASReaderSessionDelegate 

Source
pub unsafe trait NFCVASReaderSessionDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn readerSessionDidBecomeActive(&self, session: &NFCVASReaderSession)
       where Self: Sized + Message { ... }
    unsafe fn readerSession_didInvalidateWithError(
        &self,
        session: &NFCVASReaderSession,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
    unsafe fn readerSession_didReceiveVASResponses(
        &self,
        session: &NFCVASReaderSession,
        responses: &NSArray<NFCVASResponse>,
    )
       where Self: Sized + Message { ... }
}
Expand description

Value Added Service (VAS) reader session callbacks.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn readerSessionDidBecomeActive(&self, session: &NFCVASReaderSession)
where Self: Sized + Message,

Parameter session: The session object in the active state.

Gets called when the NFC reader session has become active. RF is enabled and reader is scanning for VAS tags. The

 readerSession:didReceiveVASResponses: @link/ will be called when a VAS transaction is completed.
  
Source

unsafe fn readerSession_didInvalidateWithError( &self, session: &NFCVASReaderSession, error: &NSError, )
where Self: Sized + Message,

Parameter session: The session object that is invalidated.

Parameter error: The error indicates the invalidation reason.

Gets called when a session becomes invalid. At this point the client is expected to discard the returned session object.

Source

unsafe fn readerSession_didReceiveVASResponses( &self, session: &NFCVASReaderSession, responses: &NSArray<NFCVASResponse>, )
where Self: Sized + Message,

Parameter session: The session object used for tag detection.

Parameter responses: Array of

 NFCVASResponse @link/ objects.  The order of the response objects follows the
                  sequence of GET VAS DATA sent by the reader session.

 @discussion      Gets called when the reader completes the requested VAS transaction.  Polling
                  is automatically restarted once the detected tag is removed from the reader's read range.
  

Trait Implementations§

Source§

impl ProtocolType for dyn NFCVASReaderSessionDelegate

Source§

const NAME: &'static str = "NFCVASReaderSessionDelegate"

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 NFCVASReaderSessionDelegate

Implementations on Foreign Types§

Source§

impl<T> NFCVASReaderSessionDelegate for ProtocolObject<T>

Implementors§