Struct nfc1_sys::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: usize) -> usize>, pub open: Option<unsafe extern "C" fn(context: *const nfc_context, connstring: *mut c_char) -> *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 u8, szInitData: usize, pnt: *mut nfc_target) -> c_int>, pub initiator_poll_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: usize, uiPollNr: u8, btPeriod: u8, 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 u8, szTx: usize, pbtRx: *mut u8, szRx: usize, timeout: c_int) -> c_int>, pub initiator_transceive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8, pbtRx: *mut u8, pbtRxPar: *mut u8) -> c_int>, pub initiator_transceive_bytes_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTx: usize, pbtRx: *mut u8, szRx: usize, cycles: *mut u32) -> c_int>, pub initiator_transceive_bits_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8, pbtRx: *mut u8, pbtRxPar: *mut u8, cycles: *mut u32) -> 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 u8, szRx: usize, timeout: c_int) -> c_int>, pub target_send_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTx: usize, timeout: c_int) -> c_int>, pub target_receive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut u8, szRxLen: usize, timeout: c_int) -> c_int>, pub target_send_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8) -> c_int>, pub target_receive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut u8, szRxLen: usize, pbtRxPar: *mut u8) -> c_int>, pub device_set_property_bool: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, bEnable: bool) -> 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: usize) -> usize>§open: Option<unsafe extern "C" fn(context: *const nfc_context, connstring: *mut c_char) -> *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 u8, szInitData: usize, pnt: *mut nfc_target) -> c_int>§initiator_poll_target: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pnmModulations: *const nfc_modulation, szModulations: usize, uiPollNr: u8, btPeriod: u8, 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 u8, szTx: usize, pbtRx: *mut u8, szRx: usize, timeout: c_int) -> c_int>§initiator_transceive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8, pbtRx: *mut u8, pbtRxPar: *mut u8) -> c_int>§initiator_transceive_bytes_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTx: usize, pbtRx: *mut u8, szRx: usize, cycles: *mut u32) -> c_int>§initiator_transceive_bits_timed: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8, pbtRx: *mut u8, pbtRxPar: *mut u8, cycles: *mut u32) -> 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 u8, szRx: usize, timeout: c_int) -> c_int>§target_send_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTx: usize, timeout: c_int) -> c_int>§target_receive_bytes: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut u8, szRxLen: usize, timeout: c_int) -> c_int>§target_send_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtTx: *const u8, szTxBits: usize, pbtTxPar: *const u8) -> c_int>§target_receive_bits: Option<unsafe extern "C" fn(pnd: *mut nfc_device, pbtRx: *mut u8, szRxLen: usize, pbtRxPar: *mut u8) -> c_int>§device_set_property_bool: Option<unsafe extern "C" fn(pnd: *mut nfc_device, property: nfc_property, bEnable: bool) -> 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 copy 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 Copy for nfc_driver

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.