Struct NfcDeviceBase

Source
#[repr(C)]
pub struct NfcDeviceBase {
Show 13 fields pub protocol_name: *const c_char, pub alloc: NfcDeviceAlloc, pub free: NfcDeviceFree, pub reset: NfcDeviceReset, pub copy: NfcDeviceCopy, pub verify: NfcDeviceVerify, pub load: NfcDeviceLoad, pub save: NfcDeviceSave, pub is_equal: NfcDeviceEqual, pub get_name: NfcDeviceGetName, pub get_uid: NfcDeviceGetUid, pub set_uid: NfcDeviceSetUid, pub get_base_data: NfcDeviceGetBaseData,
}
Expand description

Generic NFC device interface.

Each protocol must fill this structure with its own function implementations.

Fields§

§protocol_name: *const c_char

< Pointer to a statically-allocated string with the protocol name.

§alloc: NfcDeviceAlloc

< Pointer to the alloc() function.

§free: NfcDeviceFree

< Pointer to the free() function.

§reset: NfcDeviceReset

< Pointer to the reset() function.

§copy: NfcDeviceCopy

< Pointer to the copy() function.

§verify: NfcDeviceVerify

< Deprecated. Set to NULL in new protocols.

§load: NfcDeviceLoad

< Pointer to the load() function.

§save: NfcDeviceSave

< Pointer to the save() function.

§is_equal: NfcDeviceEqual

< Pointer to the is_equal() function.

§get_name: NfcDeviceGetName

< Pointer to the get_name() function.

§get_uid: NfcDeviceGetUid

< Pointer to the get_uid() function.

§set_uid: NfcDeviceSetUid

< Pointer to the set_uid() function.

§get_base_data: NfcDeviceGetBaseData

< Pointer to the get_base_data() function.

Trait Implementations§

Source§

impl Clone for NfcDeviceBase

Source§

fn clone(&self) -> NfcDeviceBase

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 NfcDeviceBase

Source§

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

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

impl Copy for NfcDeviceBase

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> 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, 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.