[][src]Struct xmpp_parsers::Element

pub struct Element { /* fields omitted */ }

A struct representing a DOM Element.

Methods

impl Element[src]

pub fn builder<S>(name: S) -> ElementBuilder where
    S: AsRef<str>, 
[src]

Return a builder for an Element with the given name.

Examples

use minidom::Element;

let elem = Element::builder("name")
                   .ns("namespace")
                   .attr("name", "value")
                   .append("inner")
                   .build();

assert_eq!(elem.name(), "name");
assert_eq!(elem.ns(), Some("namespace".to_owned()));
assert_eq!(elem.attr("name"), Some("value"));
assert_eq!(elem.attr("inexistent"), None);
assert_eq!(elem.text(), "inner");

pub fn bare<S>(name: S) -> Element where
    S: Into<String>, 
[src]

Returns a bare minimum Element with this name.

Examples

use minidom::Element;

let bare = Element::bare("name");

assert_eq!(bare.name(), "name");
assert_eq!(bare.ns(), None);
assert_eq!(bare.attr("name"), None);
assert_eq!(bare.text(), "");

pub fn name(&self) -> &str[src]

Returns a reference to the name of this element.

pub fn prefix(&self) -> Option<&str>[src]

Returns a reference to the prefix of this element.

Examples

use minidom::Element;

let elem = Element::builder("prefix:name")
                   .build();

assert_eq!(elem.name(), "name");
assert_eq!(elem.prefix(), Some("prefix"));

pub fn ns(&self) -> Option<String>[src]

Returns a reference to the namespace of this element, if it has one, else None.

pub fn attr(&self, name: &str) -> Option<&str>[src]

Returns a reference to the value of the given attribute, if it exists, else None.

pub fn attrs(&self) -> Attrs[src]

Returns an iterator over the attributes of this element.

Example

use minidom::Element;

let elm: Element = "<elem a=\"b\" />".parse().unwrap();

let mut iter = elm.attrs();

assert_eq!(iter.next().unwrap(), ("a", "b"));
assert_eq!(iter.next(), None);

pub fn attrs_mut(&mut self) -> AttrsMut[src]

Returns an iterator over the attributes of this element, with the value being a mutable reference.

pub fn set_attr<S, V>(&mut self, name: S, val: V) where
    S: Into<String>,
    V: IntoAttributeValue
[src]

Modifies the value of an attribute.

pub fn is<N, NS>(&self, name: N, namespace: NS) -> bool where
    N: AsRef<str>,
    NS: AsRef<str>, 
[src]

Returns whether the element has the given name and namespace.

Examples

use minidom::Element;

let elem = Element::builder("name").ns("namespace").build();

assert_eq!(elem.is("name", "namespace"), true);
assert_eq!(elem.is("name", "wrong"), false);
assert_eq!(elem.is("wrong", "namespace"), false);
assert_eq!(elem.is("wrong", "wrong"), false);

pub fn has_ns<NS>(&self, namespace: NS) -> bool where
    NS: AsRef<str>, 
[src]

Returns whether the element has the given namespace.

Examples

use minidom::Element;

let elem = Element::builder("name").ns("namespace").build();

assert_eq!(elem.has_ns("namespace"), true);
assert_eq!(elem.has_ns("wrong"), false);

pub fn from_reader<R>(reader: &mut Reader<R>) -> Result<Element, Error> where
    R: BufRead
[src]

Parse a document from an EventReader.

pub fn write_to<W>(&self, writer: &mut W) -> Result<(), Error> where
    W: Write
[src]

Output a document to a Writer.

pub fn to_writer<W>(&self, writer: &mut Writer<W>) -> Result<(), Error> where
    W: Write
[src]

Output the document to quick-xml Writer

pub fn write_to_inner<W>(&self, writer: &mut Writer<W>) -> Result<(), Error> where
    W: Write
[src]

Like write_to() but without the <?xml?> prelude

pub fn nodes(&self) -> Iter<Node>[src]

Returns an iterator over references to every child node of this element.

Examples

use minidom::Element;

let elem: Element = "<root>a<c1 />b<c2 />c</root>".parse().unwrap();

let mut iter = elem.nodes();

assert_eq!(iter.next().unwrap().as_text().unwrap(), "a");
assert_eq!(iter.next().unwrap().as_element().unwrap().name(), "c1");
assert_eq!(iter.next().unwrap().as_text().unwrap(), "b");
assert_eq!(iter.next().unwrap().as_element().unwrap().name(), "c2");
assert_eq!(iter.next().unwrap().as_text().unwrap(), "c");
assert_eq!(iter.next(), None);

pub fn nodes_mut(&mut self) -> IterMut<Node>[src]

Returns an iterator over mutable references to every child node of this element.

pub fn children(&self) -> Children[src]

Returns an iterator over references to every child element of this element.

Examples

use minidom::Element;

let elem: Element = "<root>hello<child1 />this<child2 />is<child3 />ignored</root>".parse().unwrap();

let mut iter = elem.children();
assert_eq!(iter.next().unwrap().name(), "child1");
assert_eq!(iter.next().unwrap().name(), "child2");
assert_eq!(iter.next().unwrap().name(), "child3");
assert_eq!(iter.next(), None);

pub fn children_mut(&mut self) -> ChildrenMut[src]

Returns an iterator over mutable references to every child element of this element.

pub fn texts(&self) -> Texts[src]

Returns an iterator over references to every text node of this element.

Examples

use minidom::Element;

let elem: Element = "<root>hello<c /> world!</root>".parse().unwrap();

let mut iter = elem.texts();
assert_eq!(iter.next().unwrap(), "hello");
assert_eq!(iter.next().unwrap(), " world!");
assert_eq!(iter.next(), None);

pub fn texts_mut(&mut self) -> TextsMut[src]

Returns an iterator over mutable references to every text node of this element.

pub fn append_child(&mut self, child: Element) -> &mut Element[src]

Appends a child node to the Element, returning the appended node.

Examples

use minidom::Element;

let mut elem = Element::bare("root");

assert_eq!(elem.children().count(), 0);

elem.append_child(Element::bare("child"));

{
    let mut iter = elem.children();
    assert_eq!(iter.next().unwrap().name(), "child");
    assert_eq!(iter.next(), None);
}

let child = elem.append_child(Element::bare("new"));

assert_eq!(child.name(), "new");

pub fn append_text_node<S>(&mut self, child: S) where
    S: Into<String>, 
[src]

Appends a text node to an Element.

Examples

use minidom::Element;

let mut elem = Element::bare("node");

assert_eq!(elem.text(), "");

elem.append_text_node("text");

assert_eq!(elem.text(), "text");

pub fn append_comment_node<S>(&mut self, child: S) where
    S: Into<String>, 
[src]

Appends a comment node to an Element.

Examples

use minidom::Element;

let mut elem = Element::bare("node");

elem.append_comment_node("comment");

pub fn append_node(&mut self, node: Node)[src]

Appends a node to an Element.

Examples

use minidom::{Element, Node};

let mut elem = Element::bare("node");

elem.append_node(Node::Text("hello".to_owned()));

assert_eq!(elem.text(), "hello");

pub fn text(&self) -> String[src]

Returns the concatenation of all text nodes in the Element.

Examples

use minidom::Element;

let elem: Element = "<node>hello,<split /> world!</node>".parse().unwrap();

assert_eq!(elem.text(), "hello, world!");

pub fn get_child<N, NS>(&self, name: N, namespace: NS) -> Option<&Element> where
    N: AsRef<str>,
    NS: AsRef<str>, 
[src]

Returns a reference to the first child element with the specific name and namespace, if it exists in the direct descendants of this Element, else returns None.

Examples

use minidom::Element;

let elem: Element = r#"<node xmlns="ns"><a /><a xmlns="other_ns" /><b /></node>"#.parse().unwrap();

assert!(elem.get_child("a", "ns").unwrap().is("a", "ns"));
assert!(elem.get_child("a", "other_ns").unwrap().is("a", "other_ns"));
assert!(elem.get_child("b", "ns").unwrap().is("b", "ns"));
assert_eq!(elem.get_child("c", "ns"), None);
assert_eq!(elem.get_child("b", "other_ns"), None);
assert_eq!(elem.get_child("a", "inexistent_ns"), None);

pub fn get_child_mut<N, NS>(
    &mut self,
    name: N,
    namespace: NS
) -> Option<&mut Element> where
    N: AsRef<str>,
    NS: AsRef<str>, 
[src]

Returns a mutable reference to the first child element with the specific name and namespace, if it exists in the direct descendants of this Element, else returns None.

pub fn has_child<N, NS>(&self, name: N, namespace: NS) -> bool where
    N: AsRef<str>,
    NS: AsRef<str>, 
[src]

Returns whether a specific child with this name and namespace exists in the direct descendants of the Element.

Examples

use minidom::Element;

let elem: Element = r#"<node xmlns="ns"><a /><a xmlns="other_ns" /><b /></node>"#.parse().unwrap();

assert_eq!(elem.has_child("a", "other_ns"), true);
assert_eq!(elem.has_child("a", "ns"), true);
assert_eq!(elem.has_child("a", "inexistent_ns"), false);
assert_eq!(elem.has_child("b", "ns"), true);
assert_eq!(elem.has_child("b", "other_ns"), false);
assert_eq!(elem.has_child("b", "inexistent_ns"), false);

Trait Implementations

impl FromStr for Element[src]

type Err = Error

The associated error which can be returned from parsing.

impl Eq for Element[src]

impl Debug for Element[src]

impl PartialEq<Element> for Element[src]

impl Clone for Element[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<Bind> for Element[src]

impl From<Iq> for Element[src]

impl From<Body> for Element[src]

impl From<Subject> for Element[src]

impl From<Thread> for Element[src]

impl From<Message> for Element[src]

impl From<Presence> for Element[src]

impl From<Auth> for Element[src]

impl From<Challenge> for Element[src]

impl From<Response> for Element[src]

impl From<Abort> for Element[src]

impl From<Success> for Element[src]

impl From<DefinedCondition> for Element[src]

impl From<Failure> for Element[src]

impl From<DefinedCondition> for Element[src]

impl From<StanzaError> for Element[src]

impl From<Stream> for Element[src]

impl From<Group> for Element[src]

impl From<Item> for Element[src]

impl From<Roster> for Element[src]

impl From<Open> for Element[src]

impl From<Option_> for Element[src]

impl From<Field> for Element[src]

impl From<DataForm> for Element[src]

impl From<DiscoInfoQuery> for Element[src]

impl From<Feature> for Element[src]

impl From<Identity> for Element[src]

impl From<DiscoInfoResult> for Element[src]

impl From<DiscoItemsQuery> for Element[src]

impl From<Item> for Element[src]

impl From<DiscoItemsResult> for Element[src]

impl From<History> for Element[src]

impl From<Muc> for Element[src]

impl From<Status> for Element[src]

impl From<Actor> for Element[src]

impl From<Continue> for Element[src]

impl From<Reason> for Element[src]

impl From<Item> for Element[src]

impl From<MucUser> for Element[src]

impl From<Open> for Element[src]

impl From<Data> for Element[src]

impl From<Close> for Element[src]

impl From<Conference> for Element[src]

impl From<Url> for Element[src]

impl From<Storage> for Element[src]

impl From<SetQuery> for Element[src]

impl From<SetResult> for Element[src]

impl From<Item> for Element[src]

impl From<PubSubEvent> for Element[src]

impl From<Affiliations> for Element[src]

impl From<Affiliation> for Element[src]

impl From<Configure> for Element[src]

impl From<Create> for Element[src]

impl From<Default> for Element[src]

impl From<Items> for Element[src]

impl From<Item> for Element[src]

impl From<Options> for Element[src]

impl From<Publish> for Element[src]

impl From<PublishOptions> for Element[src]

impl From<Retract> for Element[src]

impl From<SubscribeOptions> for Element[src]

impl From<Subscribe> for Element[src]

impl From<Subscriptions> for Element[src]

impl From<SubscriptionElem> for Element[src]

impl From<Unsubscribe> for Element[src]

impl From<PubSub> for Element[src]

impl From<Query> for Element[src]

impl From<Metadata> for Element[src]

impl From<Info> for Element[src]

impl From<Data> for Element[src]

impl From<ChatState> for Element[src]

impl From<VersionQuery> for Element[src]

impl From<VersionResult> for Element[src]

impl From<MoodEnum> for Element[src]

impl From<Text> for Element[src]

impl From<Handshake> for Element[src]

impl From<Caps> for Element[src]

impl From<Content> for Element[src]

impl From<Reason> for Element[src]

impl From<ReasonElement> for Element[src]

impl From<Jingle> for Element[src]

impl From<Description> for Element[src]

impl From<PayloadType> for Element[src]

impl From<Parameter> for Element[src]

impl From<Nick> for Element[src]

impl From<Transport> for Element[src]

impl From<Candidate> for Element[src]

impl From<Request> for Element[src]

impl From<Received> for Element[src]

impl From<BlocklistRequest> for Element[src]

impl From<BlocklistResult> for Element[src]

impl From<Block> for Element[src]

impl From<Unblock> for Element[src]

impl From<Blocked> for Element[src]

impl From<A> for Element[src]

impl From<Enable> for Element[src]

impl From<Enabled> for Element[src]

impl From<Failed> for Element[src]

impl From<R> for Element[src]

impl From<Resume> for Element[src]

impl From<Resumed> for Element[src]

impl From<StreamManagement> for Element[src]

impl From<Ping> for Element[src]

impl From<TimeQuery> for Element[src]

impl From<TimeResult> for Element[src]

impl From<Delay> for Element[src]

impl From<URI> for Element[src]

impl From<MediaElement> for Element[src]

impl From<Attention> for Element[src]

impl From<Range> for Element[src]

impl From<File> for Element[src]

impl From<Description> for Element[src]

impl From<Checksum> for Element[src]

impl From<Received> for Element[src]

impl From<Candidate> for Element[src]

impl From<Transport> for Element[src]

impl From<Transport> for Element[src]

impl From<Forwarded> for Element[src]

impl From<Hash> for Element[src]

impl From<Replace> for Element[src]

impl From<Query> for Element[src]

impl From<Result_> for Element[src]

impl From<Fin> for Element[src]

impl From<Prefs> for Element[src]

impl From<Idle> for Element[src]

impl From<Fingerprint> for Element[src]

impl From<JingleMI> for Element[src]

impl From<StanzaId> for Element[src]

impl From<OriginId> for Element[src]

impl From<ExplicitMessageEncryption> for Element[src]

impl From<ECaps2> for Element[src]

impl TryFrom<Element> for Bind[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Iq[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Body[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Subject[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Thread[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Message[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Presence[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Auth[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Challenge[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Response[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Abort[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Success[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DefinedCondition[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Failure[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DefinedCondition[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for StanzaError[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Stream[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Group[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Item[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Roster[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Open[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Option_[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Field[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DataForm[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DiscoInfoQuery[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Feature[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Identity[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DiscoInfoResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DiscoItemsQuery[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Item[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for DiscoItemsResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for History[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Muc[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Status[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Actor[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Continue[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Reason[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Item[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for MucUser[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Open[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Data[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Close[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Conference[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Url[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Storage[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for SetQuery[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for SetResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Item[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for PubSubEvent[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Affiliations[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Affiliation[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Configure[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Create[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Default[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Items[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Item[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Options[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Publish[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for PublishOptions[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Retract[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for SubscribeOptions[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Subscribe[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Subscriptions[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for SubscriptionElem[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Unsubscribe[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for PubSub[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Query[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Metadata[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Info[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Data[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for ChatState[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for VersionQuery[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for VersionResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for MoodEnum[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Text[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Handshake[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Caps[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Content[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for ReasonElement[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Jingle[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Description[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for PayloadType[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Parameter[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Nick[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Transport[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Candidate[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Request[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Received[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for BlocklistRequest[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for BlocklistResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Block[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Unblock[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Blocked[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for A[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Enable[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Enabled[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Failed[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for R[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Resume[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Resumed[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for StreamManagement[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Ping[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for TimeQuery[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for TimeResult[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Delay[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for URI[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for MediaElement[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Attention[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Range[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for File[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Description[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Checksum[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Received[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Candidate[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Transport[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Transport[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Forwarded[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Hash[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Replace[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Query[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Result_[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Fin[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Prefs[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Idle[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for Fingerprint[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for JingleMI[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for StanzaId[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for OriginId[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for ExplicitMessageEncryption[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Element> for ECaps2[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl Unpin for Element

impl !Sync for Element

impl !Send for Element

impl !RefUnwindSafe for Element

impl !UnwindSafe for Element

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoElements for T where
    T: Into<Element>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self