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]
impl<T> SessionWrapper<T>
pub unsafe fn associate(
handle: *mut PluginSession,
state: T
) -> Result<Box<Arc<Self>>, NullHandleError>
[src]
pub unsafe fn associate(
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).
pub unsafe fn from_ptr(
handle: *mut PluginSession
) -> Result<Arc<Self>, NullHandleError>
[src]
pub unsafe fn from_ptr(
handle: *mut PluginSession
) -> Result<Arc<Self>, NullHandleError>
Retrieves and clones the reference-counted state wrapper associated with a Janus PluginSession.
pub fn as_ptr(&self) -> *mut PluginSession
[src]
pub fn as_ptr(&self) -> *mut PluginSession
Returns the opaque pointer for this session.
Trait Implementations
impl<T: Debug> Debug for SessionWrapper<T>
[src]
impl<T: Debug> Debug for SessionWrapper<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Clone> Clone for SessionWrapper<T>
[src]
impl<T: Clone> Clone for SessionWrapper<T>
fn clone(&self) -> SessionWrapper<T>
[src]
fn clone(&self) -> SessionWrapper<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T> Hash for SessionWrapper<T>
[src]
impl<T> Hash for SessionWrapper<T>
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> PartialEq for SessionWrapper<T>
[src]
impl<T> PartialEq for SessionWrapper<T>
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T> Eq for SessionWrapper<T>
[src]
impl<T> Eq for SessionWrapper<T>
impl<T> Deref for SessionWrapper<T>
[src]
impl<T> Deref for SessionWrapper<T>
type Target = T
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Rfn deref(&self) -> &T
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<T: Sync> Sync for SessionWrapper<T>
[src]
impl<T: Sync> Sync for SessionWrapper<T>
impl<T: Send> Send for SessionWrapper<T>
[src]
impl<T: Send> Send for SessionWrapper<T>