Enum tokio_xmpp::Packet[][src]

pub enum Packet {
    StreamStart(HashMap<String, String>),
    Stanza(Element),
    Text(String),
    StreamEnd,
}
Expand description

Anything that can be sent or received on an XMPP/XML stream

Variants

StreamStart(HashMap<String, String>)

Tuple Fields

<stream:stream> start tag

Stanza(Element)

Tuple Fields

0: Element

A complete stanza or nonza

Text(String)

Tuple Fields

0: String

Plain text (think whitespace keep-alive)

StreamEnd

</stream:stream> closing tag

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Outgoing XMPP packets

See send_stanza() for an async fn

The type of value produced by the sink when an error occurs.

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 more

Attempts to prepare the Sink to receive a value. Read more

Flush any remaining output from this sink. Read more

Flush any remaining output and close this sink, if necessary. Read more

Outgoing XMPP packets

See send_stanza() for an async fn

The type of value produced by the sink when an error occurs.

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 more

Attempts to prepare the Sink to receive a value. Read more

Flush any remaining output from this sink. Read more

Flush any remaining output and close this sink, if necessary. Read more

Proxy to self.stream

The type of value produced by the sink when an error occurs.

Attempts to prepare the Sink to receive a value. Read more

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 more

Flush any remaining output from this sink. Read more

Flush any remaining output and close this sink, if necessary. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.