nfc_driver

Struct nfc_driver 

Source
#[repr(C)]
pub struct nfc_driver {
Show 30 fields pub name: *const c_char, pub scan_type: scan_type_enum, pub scan: Option<unsafe extern "C" fn(context: *const nfc_context, connstrings: *mut nfc_connstring, connstrings_len: size_t) -> size_t>, pub open: Option<unsafe extern "C" fn(context: *const nfc_context, connstring: nfc_connstring) -> *mut nfc_device>, pub close: Option<unsafe extern "C" fn(pnd: *mut nfc_device)>, pub strerror: Option<unsafe extern "C" fn(pnd: *const nfc_device) -> *const c_char>, pub initiator_init: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>, pub initiator_init_secure_element: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>, pub initiator_select_passive_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, nm: nfc_modulation, pbtInitData: *const uint8_t, szInitData: size_t, pnt: *mut nfc_target) -> c_int>, pub initiator_poll_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: size_t, uiPollNr: uint8_t, btPeriod: uint8_t, pnt: *mut nfc_target) -> c_int>, pub initiator_select_dep_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, ndm: nfc_dep_mode, nbr: nfc_baud_rate, pndiInitiator: *const nfc_dep_info, pnt: *mut nfc_target, timeout: c_int) -> c_int>, pub initiator_deselect_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>, pub initiator_transceive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>, pub initiator_transceive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t) -> c_int>, pub initiator_transceive_bytes_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, cycles: *mut uint32_t) -> c_int>, pub initiator_transceive_bits_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t, cycles: *mut uint32_t) -> c_int>, pub initiator_target_is_present: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnt: *const nfc_target) -> c_int>, pub target_init: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnt: *mut nfc_target, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>, pub target_send_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, timeout: c_int) -> c_int>, pub target_receive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, timeout: c_int) -> c_int>, pub target_send_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t) -> c_int>, pub target_receive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, pbtRxPar: *mut uint8_t) -> c_int>, pub device_set_property_bool: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, bEnable: u8) -> c_int>, pub device_set_property_int: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, value: c_int) -> c_int>, pub get_supported_modulation: Option<unsafe extern "C" fn(pnd: *mut nfc_device, mode: nfc_mode, supported_mt: *mut *const nfc_modulation_type) -> c_int>, pub get_supported_baud_rate: Option<unsafe extern "C" fn(pnd: *mut nfc_device, mode: nfc_mode, nmt: nfc_modulation_type, supported_br: *mut *const nfc_baud_rate) -> c_int>, pub device_get_information_about: Option<unsafe extern "C" fn(pnd: *mut nfc_device, buf: *mut *mut c_char) -> c_int>, pub abort_command: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>, pub idle: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>, pub powerdown: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>,
}

Fields§

§name: *const c_char§scan_type: scan_type_enum§scan: Option<unsafe extern "C" fn(context: *const nfc_context, connstrings: *mut nfc_connstring, connstrings_len: size_t) -> size_t>§open: Option<unsafe extern "C" fn(context: *const nfc_context, connstring: nfc_connstring) -> *mut nfc_device>§close: Option<unsafe extern "C" fn(pnd: *mut nfc_device)>§strerror: Option<unsafe extern "C" fn(pnd: *const nfc_device) -> *const c_char>§initiator_init: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>§initiator_init_secure_element: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>§initiator_select_passive_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, nm: nfc_modulation, pbtInitData: *const uint8_t, szInitData: size_t, pnt: *mut nfc_target) -> c_int>§initiator_poll_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: size_t, uiPollNr: uint8_t, btPeriod: uint8_t, pnt: *mut nfc_target) -> c_int>§initiator_select_dep_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, ndm: nfc_dep_mode, nbr: nfc_baud_rate, pndiInitiator: *const nfc_dep_info, pnt: *mut nfc_target, timeout: c_int) -> c_int>§initiator_deselect_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>§initiator_transceive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>§initiator_transceive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t) -> c_int>§initiator_transceive_bytes_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, pbtRx: *mut uint8_t, szRx: size_t, cycles: *mut uint32_t) -> c_int>§initiator_transceive_bits_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t, pbtRx: *mut uint8_t, pbtRxPar: *mut uint8_t, cycles: *mut uint32_t) -> c_int>§initiator_target_is_present: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnt: *const nfc_target) -> c_int>§target_init: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnt: *mut nfc_target, pbtRx: *mut uint8_t, szRx: size_t, timeout: c_int) -> c_int>§target_send_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTx: size_t, timeout: c_int) -> c_int>§target_receive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, timeout: c_int) -> c_int>§target_send_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const uint8_t, szTxBits: size_t, pbtTxPar: *const uint8_t) -> c_int>§target_receive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut uint8_t, szRxLen: size_t, pbtRxPar: *mut uint8_t) -> c_int>§device_set_property_bool: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, bEnable: u8) -> c_int>§device_set_property_int: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, value: c_int) -> c_int>§get_supported_modulation: Option<unsafe extern "C" fn(pnd: *mut nfc_device, mode: nfc_mode, supported_mt: *mut *const nfc_modulation_type) -> c_int>§get_supported_baud_rate: Option<unsafe extern "C" fn(pnd: *mut nfc_device, mode: nfc_mode, nmt: nfc_modulation_type, supported_br: *mut *const nfc_baud_rate) -> c_int>§device_get_information_about: Option<unsafe extern "C" fn(pnd: *mut nfc_device, buf: *mut *mut c_char) -> c_int>§abort_command: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>§idle: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>§powerdown: Option<unsafe extern "C" fn(pnd: *mut nfc_device) -> c_int>

Trait Implementations§

Source§

impl Clone for nfc_driver

Source§

fn clone(&self) -> nfc_driver

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 nfc_driver

Source§

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

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

impl Default for nfc_driver

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for nfc_driver

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.