Struct janus_plugin::PluginResult [−][src]
pub struct PluginResult { /* fields omitted */ }
A Janus plugin result; what a plugin returns to the gateway as a direct response to a signalling message.
Methods
impl PluginResult
[src]
impl PluginResult
pub unsafe fn new(
type_: PluginResultType,
text: *const c_char,
content: *mut RawJanssonValue
) -> Self
[src]
pub unsafe fn new(
type_: PluginResultType,
text: *const c_char,
content: *mut RawJanssonValue
) -> Self
Creates a new plugin result.
pub fn ok(response: JanssonValue) -> Self
[src]
pub fn ok(response: JanssonValue) -> Self
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]
pub fn ok_wait(hint: Option<&'static CStr>) -> Self
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]
pub fn error(msg: &'static CStr) -> Self
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]
pub fn into_raw(self) -> *mut RawPluginResult
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 Debug for PluginResult
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 Deref for PluginResult
[src]
impl Deref for PluginResult
type Target = RawPluginResult
The resulting type after dereferencing.
fn deref(&self) -> &RawPluginResult
[src]
fn deref(&self) -> &RawPluginResult
Dereferences the value.
impl Drop for PluginResult
[src]
impl Drop for PluginResult
impl Send for PluginResult
[src]
impl Send for PluginResult
Auto Trait Implementations
impl !Sync for PluginResult
impl !Sync for PluginResult