[−][src]Struct janus_plugin::PluginResult
A Janus plugin result; what a plugin returns to the gateway as a direct response to a signalling message.
Implementations
impl PluginResult
[src]
pub unsafe fn new(
type_: PluginResultType,
text: *const c_char,
content: *mut RawJanssonValue
) -> Self
[src]
type_: PluginResultType,
text: *const c_char,
content: *mut RawJanssonValue
) -> Self
Creates a new plugin result.
pub fn ok(response: JanssonValue) -> Self
[src]
Creates a plugin result indicating a synchronously successful request. The provided response JSON will be passed back to the client.
pub fn ok_wait(hint: Option<&'static CStr>) -> Self
[src]
Creates a plugin result indicating an asynchronous request in progress. If provided, the hint text will be synchronously passed back to the client in the acknowledgement.
pub fn error(msg: &'static CStr) -> Self
[src]
Creates a plugin result indicating an error. The provided error text will be synchronously passed back to the client.
pub fn into_raw(self) -> *mut RawPluginResult
[src]
Transfers ownership of this result to the wrapped raw pointer. The consumer is responsible for calling
janus_plugin_result_destroy
on the pointer when finished.
Trait Implementations
impl Debug for PluginResult
[src]
impl Deref for PluginResult
[src]
type Target = RawPluginResult
The resulting type after dereferencing.
fn deref(&self) -> &RawPluginResult
[src]
impl Drop for PluginResult
[src]
impl Send for PluginResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for PluginResult
[src]
impl !Sync for PluginResult
[src]
impl Unpin for PluginResult
[src]
impl UnwindSafe for PluginResult
[src]
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,
pub 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, 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.
pub 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>,