[][src]Struct opensc_sys::sc_thread_context_t

#[repr(C)]pub struct sc_thread_context_t {
    pub ver: c_uint,
    pub create_mutex: Option<unsafe extern "C" fn(arg1: *mut *mut c_void) -> c_int>,
    pub lock_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>,
    pub unlock_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>,
    pub destroy_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>,
    pub thread_id: Option<unsafe extern "C" fn() -> c_ulong>,
}

@struct sc_thread_context_t Structure for the locking function to use when using libopensc in a multi-threaded application.

Fields

ver: c_uint

the version number of this structure (0 for this version)

create_mutex: Option<unsafe extern "C" fn(arg1: *mut *mut c_void) -> c_int>

creates a mutex object

lock_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>

locks a mutex object (blocks until the lock has been acquired)

unlock_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>

unlocks a mutex object

destroy_mutex: Option<unsafe extern "C" fn(arg1: *mut c_void) -> c_int>

destroys a mutex object

thread_id: Option<unsafe extern "C" fn() -> c_ulong>

returns unique identifier for the thread (can be NULL)

Trait Implementations

impl Clone for sc_thread_context_t[src]

impl Copy for sc_thread_context_t[src]

impl Debug for sc_thread_context_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.