NFCReaderSessionDelegate

Trait NFCReaderSessionDelegate 

Source
pub unsafe trait NFCReaderSessionDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn readerSessionDidBecomeActive(&self, session: &NFCReaderSession)
       where Self: Sized + Message { ... }
    unsafe fn readerSession_didInvalidateWithError(
        &self,
        session: &NFCReaderSession,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
    unsafe fn readerSession_didDetectTags(
        &self,
        session: &NFCReaderSession,
        tags: &NSArray<ProtocolObject<dyn NFCTag>>,
    )
       where Self: Sized + Message { ... }
}
Expand description

General reader session callbacks

See also Apple’s documentation

Provided Methods§

Source

unsafe fn readerSessionDidBecomeActive(&self, session: &NFCReaderSession)
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 tags. The

 readerSession:didDetectTags: @link/ will be called when a tag is detected.
  
Source

unsafe fn readerSession_didInvalidateWithError( &self, session: &NFCReaderSession, 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_didDetectTags( &self, session: &NFCReaderSession, tags: &NSArray<ProtocolObject<dyn NFCTag>>, )
where Self: Sized + Message,

Parameter session: The session object used for tag detection.

Parameter tags: Array of

 NFCTag @link/ objects.

 @discussion      Gets called when the reader detects NFC tag(s) in the polling sequence.
  

Trait Implementations§

Source§

impl ProtocolType for dyn NFCReaderSessionDelegate

Source§

const NAME: &'static str = "NFCReaderSessionDelegate"

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 NFCReaderSessionDelegate

Implementations on Foreign Types§

Source§

impl<T> NFCReaderSessionDelegate for ProtocolObject<T>

Implementors§