[−][src]Struct xmpp_parsers::stream::Stream
The stream opening for client-server communications.
Fields
from: Option<BareJid>
The JID of the entity opening this stream.
to: Option<BareJid>
The JID of the entity receiving this stream opening.
id: Option<String>
The id of the stream, used for authentication challenges.
version: Option<String>
The XMPP version used during this stream.
xml_lang: Option<String>
The default human language for all subsequent stanzas, which will be transmitted to other entities for better localisation.
Methods
impl Stream
[src]
pub fn new(to: BareJid) -> Stream
[src]
Creates a simple client→server <stream:stream>
element.
pub fn with_from(self, from: BareJid) -> Stream
[src]
Sets the @from attribute on this <stream:stream>
element.
pub fn with_id(self, id: String) -> Stream
[src]
Sets the @id attribute on this <stream:stream>
element.
pub fn with_lang(self, xml_lang: String) -> Stream
[src]
Sets the @xml:lang attribute on this
<stream:stream>
element.
pub fn is_version(&self, version: &str) -> bool
[src]
Checks whether the version matches the expected one.
Trait Implementations
impl From<Stream> for Element
[src]
impl Clone for Stream
[src]
fn clone(&self) -> Stream
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Stream
[src]
impl TryFrom<Element> for Stream
[src]
Auto Trait Implementations
impl Send for Stream
impl Unpin for Stream
impl Sync for Stream
impl UnwindSafe for Stream
impl RefUnwindSafe for Stream
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IntoElements for T where
T: Into<Element>,
[src]
T: Into<Element>,
fn into_elements(self, emitter: &mut ElementEmitter)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self