Type Alias tokio_xmpp::starttls::StartTlsAsyncClient
source · pub type StartTlsAsyncClient = AsyncClient<ServerConfig>;
Expand description
AsyncClient that connects over StartTls
Aliased Type§
struct StartTlsAsyncClient { /* private fields */ }
Implementations
source§impl<C: ServerConnector> Client<C>
impl<C: ServerConnector> Client<C>
sourcepub fn new_with_config(config: Config<C>) -> Self
pub fn new_with_config(config: Config<C>) -> Self
Start a new client given that the JID is already parsed.
sourcepub fn set_reconnect(&mut self, reconnect: bool) -> &mut Self
pub fn set_reconnect(&mut self, reconnect: bool) -> &mut Self
Set whether to reconnect (true
) or let the stream end
(false
) when a connection to the server has ended.
sourcepub fn bound_jid(&self) -> Option<&Jid>
pub fn bound_jid(&self) -> Option<&Jid>
Get the client’s bound JID (the one reported by the XMPP server).
sourcepub fn get_stream_features(&self) -> Option<&StreamFeatures>
pub fn get_stream_features(&self) -> Option<&StreamFeatures>
Get the stream features (<stream:features/>
) of the underlying stream
Trait Implementations
source§impl<C: ServerConnector> Sink<Packet> for Client<C>
impl<C: ServerConnector> Sink<Packet> for Client<C>
Outgoing XMPP packets
See send_stanza()
for an async fn
source§fn start_send(self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moresource§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§impl<C: ServerConnector> Stream for Client<C>
impl<C: ServerConnector> Stream for Client<C>
Incoming XMPP events
In an async fn
you may want to use this with use futures::stream::StreamExt;