tokio-xmpp: doc

This commit is contained in:
Astro 2020-03-16 00:34:46 +01:00
commit a4325c787a
5 changed files with 40 additions and 8 deletions

View file

@ -1,4 +1,4 @@
//! `XMPPStream` is the common container for all XMPP network connections
//! `XMPPStream` provides encoding/decoding for XMPP
use futures::sink::Send;
use futures::{sink::SinkExt, task::Poll, Sink, Stream};
@ -17,7 +17,10 @@ use crate::Error;
/// <stream:stream> namespace
pub const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams";
/// Wraps a `stream`
/// Wraps a binary stream (tokio's `AsyncRead + AsyncWrite`) to decode
/// and encode XMPP packets.
///
/// Implements `Sink + Stream`
pub struct XMPPStream<S: AsyncRead + AsyncWrite + Unpin> {
/// The local Jabber-Id
pub jid: Jid,