#[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>,
}
Expand description
@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§
Source§impl Clone for sc_thread_context_t
impl Clone for sc_thread_context_t
Source§fn clone(&self) -> sc_thread_context_t
fn clone(&self) -> sc_thread_context_t
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for sc_thread_context_t
impl Debug for sc_thread_context_t
impl Copy for sc_thread_context_t
Auto Trait Implementations§
impl Freeze for sc_thread_context_t
impl RefUnwindSafe for sc_thread_context_t
impl Send for sc_thread_context_t
impl Sync for sc_thread_context_t
impl Unpin for sc_thread_context_t
impl UnwindSafe for sc_thread_context_t
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more