#[repr(C)]pub struct switch_limit_interface {
pub interface_name: *const c_char,
pub incr: Option<unsafe extern "C" fn(session: *mut switch_core_session_t, realm: *const c_char, resource: *const c_char, max: c_int, interval: c_int) -> switch_status_t>,
pub release: Option<unsafe extern "C" fn(session: *mut switch_core_session_t, realm: *const c_char, resource: *const c_char) -> switch_status_t>,
pub usage: Option<unsafe extern "C" fn(realm: *const c_char, resource: *const c_char, rcount: *mut u32) -> c_int>,
pub reset: Option<unsafe extern "C" fn() -> switch_status_t>,
pub status: Option<unsafe extern "C" fn() -> *mut c_char>,
pub interval_reset: Option<unsafe extern "C" fn(realm: *const c_char, resource: *const c_char) -> 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_limit_interface,
}Expand description
\brief Abstract interface to a limit module
Fields§
§interface_name: *const c_charname of the interface
incr: Option<unsafe extern "C" fn(session: *mut switch_core_session_t, realm: *const c_char, resource: *const c_char, max: c_int, interval: c_int) -> switch_status_t>increment
release: Option<unsafe extern "C" fn(session: *mut switch_core_session_t, realm: *const c_char, resource: *const c_char) -> switch_status_t>release
usage: Option<unsafe extern "C" fn(realm: *const c_char, resource: *const c_char, rcount: *mut u32) -> c_int>usage for resource
reset: Option<unsafe extern "C" fn() -> switch_status_t>reset counters
status: Option<unsafe extern "C" fn() -> *mut c_char>freform status
interval_reset: Option<unsafe extern "C" fn(realm: *const c_char, resource: *const c_char) -> switch_status_t>reset interval counter
rwlock: *mut switch_thread_rwlock_t§refs: c_int§reflock: *mut switch_mutex_t§parent: *mut switch_loadable_module_interface_t§next: *mut switch_limit_interfaceTrait Implementations§
Source§impl Clone for switch_limit_interface
impl Clone for switch_limit_interface
Source§fn clone(&self) -> switch_limit_interface
fn clone(&self) -> switch_limit_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_limit_interface
impl Debug for switch_limit_interface
impl Copy for switch_limit_interface
Auto Trait Implementations§
impl Freeze for switch_limit_interface
impl RefUnwindSafe for switch_limit_interface
impl !Send for switch_limit_interface
impl !Sync for switch_limit_interface
impl Unpin for switch_limit_interface
impl UnwindSafe for switch_limit_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