Struct janus_plugin::session::SessionWrapper
[−]
[src]
pub struct SessionWrapper<T> {
pub handle: *mut PluginSession,
// some fields omitted
}A wrapper for a Janus session. Contains a pointer to the Janus PluginSession (which is used to identify
this session in the Janus FFI) and any Rust state associated with the session.
Fields
handle: *mut PluginSession
Methods
impl<T> SessionWrapper<T>[src]
unsafe fn associate(
handle: *mut PluginSession,
state: T
) -> Result<Box<Arc<Self>>, NullHandleError>[src]
handle: *mut PluginSession,
state: T
) -> Result<Box<Arc<Self>>, NullHandleError>
Allocates a boxed, reference-counted state wrapper associated with a Janus PluginSession (whose plugin_handle will then point to the contents of the box).
unsafe fn from_ptr(
handle: *mut PluginSession
) -> Result<Arc<Self>, NullHandleError>[src]
handle: *mut PluginSession
) -> Result<Arc<Self>, NullHandleError>
Retrieves and clones the reference-counted state wrapper associated with a Janus PluginSession.
fn as_ptr(&self) -> *mut PluginSession[src]
Returns the opaque pointer for this session.
Trait Implementations
impl<T: Debug> Debug for SessionWrapper<T>[src]
impl<T: Clone> Clone for SessionWrapper<T>[src]
fn clone(&self) -> SessionWrapper<T>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T> Hash for SessionWrapper<T>[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl<T> PartialEq for SessionWrapper<T>[src]
fn eq(&self, other: &Self) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl<T> Eq for SessionWrapper<T>[src]
impl<T> Deref for SessionWrapper<T>[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T[src]
Dereferences the value.