Struct libstrophe::Context
[−]
[src]
pub struct Context<'lg> { /* fields omitted */ }
Proxy to 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:
Drop
(xmpp_ctx_free).Eq
by comparing internal pointersSend
Methods
impl<'lg> Context<'lg>
[src]
pub fn new(logger: Logger<'lg>) -> Context<'lg>
[src]
pub fn new_with_default_logger() -> Arc<Context<'static>>
[src]
Shortcut to return a new context with default logger.
Equivalent to passing default logger to Context
constructor. The result is also wrapped in
Arc
to allow multiple ownership.
pub unsafe fn from_inner_ref(inner: *const xmpp_ctx_t) -> Context<'lg>
[src]
pub unsafe fn from_inner_ref_mut(inner: *mut xmpp_ctx_t) -> Context<'lg>
[src]
pub fn as_inner(&self) -> *const xmpp_ctx_t
[src]
pub fn set_timeout(&self, timeout: Duration)
[src]
pub fn run_once(&self, timeout: Duration)
[src]
pub fn run(&self)
[src]
pub fn stop(&self)
[src]
pub unsafe fn free<T>(&self, p: *mut T)
[src]
pub fn jid_new<RefStr: AsRef<str>>(
&self,
node: Option<&str>,
domain: RefStr,
resource: Option<&str>
) -> Option<String>
[src]
&self,
node: Option<&str>,
domain: RefStr,
resource: Option<&str>
) -> Option<String>
pub fn jid_bare<RefStr: AsRef<str>>(&self, jid: RefStr) -> Option<String>
[src]
pub fn jid_node<RefStr: AsRef<str>>(&self, jid: RefStr) -> Option<String>
[src]
pub fn jid_domain<RefStr: AsRef<str>>(&self, jid: RefStr) -> Option<String>
[src]
pub fn jid_resource<RefStr: AsRef<str>>(&self, jid: RefStr) -> Option<String>
[src]
Trait Implementations
impl<'lg> Debug for Context<'lg>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'lg> Hash for Context<'lg>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'lg> PartialEq for Context<'lg>
[src]
fn eq(&self, other: &Context) -> bool
[src]
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]
This method tests for !=
.