Trait libpulse_binding::mainloop::api::MainloopInnerType [−][src]
pub trait MainloopInnerType {
type I: MainloopInternalType;
unsafe fn get_ptr(&self) -> *mut Self::I;
unsafe fn get_api_ptr(&self) -> *const MainloopApi;
fn get_api(&self) -> &MainloopApi;
fn supports_rtclock(&self) -> bool;
unsafe fn new(
ptr: *mut Self::I,
api: *const MainloopApi,
dropfn: fn(_: &mut MainloopInner<Self::I>),
supports_rtclock: bool
) -> MainloopInner<Self::I> { ... }
}Expand description
This enables generic type enforcement with MainloopInner objects, and describes mandatory accessors for the internal pointers, allowing access to these pointers across the generic implementations to work.
Associated Types
type I: MainloopInternalType
type I: MainloopInternalType
Internal mainloop type.
Required methods
Return opaque main loop object pointer.
Warning: The pointer is only valid for the lifetime of this object.
unsafe fn get_api_ptr(&self) -> *const MainloopApi
unsafe fn get_api_ptr(&self) -> *const MainloopApi
Return raw API object pointer.
Warning: The pointer is only valid for the lifetime of this object.
fn get_api(&self) -> &MainloopApi
fn get_api(&self) -> &MainloopApi
Return main loop API object pointer.
fn supports_rtclock(&self) -> bool
fn supports_rtclock(&self) -> bool
Returns true if the mainloop implementation supports monotonic based time events.
Provided methods
unsafe fn new(
ptr: *mut Self::I,
api: *const MainloopApi,
dropfn: fn(_: &mut MainloopInner<Self::I>),
supports_rtclock: bool
) -> MainloopInner<Self::I>
unsafe fn new(
ptr: *mut Self::I,
api: *const MainloopApi,
dropfn: fn(_: &mut MainloopInner<Self::I>),
supports_rtclock: bool
) -> MainloopInner<Self::I>
Create a new instance