#[repr(C)]pub struct switch_timer_interface {
pub interface_name: *const c_char,
pub timer_init: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>,
pub timer_next: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>,
pub timer_step: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>,
pub timer_sync: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>,
pub timer_check: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t, arg2: switch_bool_t) -> switch_status_t>,
pub timer_destroy: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>,
pub rwlock: *mut switch_thread_rwlock_t,
pub refs: c_int,
pub reflock: *mut switch_mutex_t,
pub parent: *mut switch_loadable_module_interface_t,
pub next: *mut switch_timer_interface,
}Expand description
\brief A table of functions that a timer module implements
Fields§
§interface_name: *const c_charthe name of the interface
timer_init: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>function to allocate the timer
timer_next: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>function to wait for one cycle to pass
timer_step: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>function to step the timer one step
timer_sync: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>function to reset the timer
timer_check: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t, arg2: switch_bool_t) -> switch_status_t>function to check if the current step has expired
timer_destroy: Option<unsafe extern "C" fn(arg1: *mut switch_timer_t) -> switch_status_t>function to deallocate the timer
rwlock: *mut switch_thread_rwlock_t§refs: c_int§reflock: *mut switch_mutex_t§parent: *mut switch_loadable_module_interface_t§next: *mut switch_timer_interfaceTrait Implementations§
Source§impl Clone for switch_timer_interface
impl Clone for switch_timer_interface
Source§fn clone(&self) -> switch_timer_interface
fn clone(&self) -> switch_timer_interface
Returns a duplicate 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 switch_timer_interface
impl Debug for switch_timer_interface
impl Copy for switch_timer_interface
Auto Trait Implementations§
impl Freeze for switch_timer_interface
impl RefUnwindSafe for switch_timer_interface
impl !Send for switch_timer_interface
impl !Sync for switch_timer_interface
impl Unpin for switch_timer_interface
impl UnwindSafe for switch_timer_interface
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