[][src]Struct libstrophe::Context

pub struct Context<'lg, 'cn> { /* fields omitted */ }

Proxy to the underlying xmpp_ctx_t struct.

Most of the methods in this struct mimic the methods of the underlying library. So please see libstrophe docs for context and event loop plus ctx.c and event.c sources. Only where it's not the case or there is some additional logic involved then you can see the method description.

This struct implements:

Methods

impl<'lg, 'cn> Context<'lg, 'cn>[src]

pub fn new(logger: Logger<'lg>) -> Self[src]

pub fn new_with_default_logger() -> Context<'static, 'cn>[src]

Shortcut to return a new context with default logger.

Equivalent to passing default logger to Context constructor.

pub fn new_with_null_logger() -> Context<'static, 'cn>[src]

Shortcut to return a new context with null logger.

Equivalent to passing null logger to Context constructor.

pub unsafe fn from_inner_ref(inner: *const xmpp_ctx_t) -> Self[src]

pub unsafe fn from_inner_ref_mut(inner: *mut xmpp_ctx_t) -> Self[src]

pub fn as_inner(&self) -> *mut xmpp_ctx_t[src]

pub fn set_timeout(&mut self, timeout: Duration)[src]

xmpp_set_timeout

Default timeout is 1000ms

pub fn run_once(&self, timeout: Duration)[src]

pub fn run(&self)[src]

pub fn stop(&self)[src]

Trait Implementations

impl<'_, '_> Drop for Context<'_, '_>[src]

fn drop(&mut self)[src]

impl<'_, '_> PartialEq<Context<'_, '_>> for Context<'_, '_>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'_, '_> Eq for Context<'_, '_>[src]

impl<'_, '_> Send for Context<'_, '_>[src]

impl<'lg, 'cn> Debug for Context<'lg, 'cn>[src]

Auto Trait Implementations

impl<'lg, 'cn> !Sync for Context<'lg, 'cn>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]