[−][src]Struct janus_plugin::session::SessionWrapper
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]
pub 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).
pub 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.
pub fn as_ptr(&self) -> *mut PluginSession
[src]
Returns the opaque pointer for this session.
Trait Implementations
impl<T: Clone> Clone for SessionWrapper<T>
[src]
fn clone(&self) -> SessionWrapper<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug> Debug for SessionWrapper<T>
[src]
impl<T> Deref for SessionWrapper<T>
[src]
impl<T> Drop for SessionWrapper<T>
[src]
impl<T> Eq for SessionWrapper<T>
[src]
impl<T> Hash for SessionWrapper<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> PartialEq<SessionWrapper<T>> for SessionWrapper<T>
[src]
impl<T: Send> Send for SessionWrapper<T>
[src]
impl<T: Sync> Sync for SessionWrapper<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for SessionWrapper<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Unpin for SessionWrapper<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SessionWrapper<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,