[−][src]Struct xmpp_parsers::Element
A struct representing a DOM Element.
Methods
impl Element
[src]
pub fn builder<S>(name: S) -> ElementBuilder where
S: AsRef<str>,
[src]
S: AsRef<str>,
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]
S: Into<String>,
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]
S: Into<String>,
V: IntoAttributeValue,
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]
N: AsRef<str>,
NS: AsRef<str>,
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]
NS: AsRef<str>,
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]
R: BufRead,
Parse a document from an EventReader
.
pub fn write_to<W>(&self, writer: &mut W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
Output a document to a Writer
.
pub fn to_writer<W>(&self, writer: &mut Writer<W>) -> Result<(), Error> where
W: Write,
[src]
W: Write,
Output the document to quick-xml Writer
pub fn write_to_inner<W>(&self, writer: &mut Writer<W>) -> Result<(), Error> where
W: Write,
[src]
W: Write,
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]
S: Into<String>,
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]
S: Into<String>,
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]
N: AsRef<str>,
NS: AsRef<str>,
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]
&mut self,
name: N,
namespace: NS
) -> Option<&mut Element> where
N: AsRef<str>,
NS: AsRef<str>,
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]
N: AsRef<str>,
NS: AsRef<str>,
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);
pub fn remove_child<N, NS>(&mut self, name: N, namespace: NS) -> Option<Element> where
N: AsRef<str>,
NS: AsRef<str>,
[src]
N: AsRef<str>,
NS: AsRef<str>,
Removes the first child with this name and namespace, if it exists, and returns an
Option<Element>
containing this child if it succeeds.
Returns None
if no child matches this name and namespace.
Examples
use minidom::Element; let mut elem: Element = r#"<node xmlns="ns"><a /><a xmlns="other_ns" /><b /></node>"#.parse().unwrap(); assert!(elem.remove_child("a", "ns").unwrap().is("a", "ns")); assert!(elem.remove_child("a", "ns").is_none()); assert!(elem.remove_child("inexistent", "inexistent").is_none());
Trait Implementations
impl Clone for Element
[src]
impl Debug for Element
[src]
impl FromStr for Element
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Element, Error>
[src]
impl Eq for Element
[src]
impl PartialEq<Element> for Element
[src]
impl From<BindQuery> for Element
[src]
impl From<BindResponse> for Element
[src]
fn from(bind: BindResponse) -> 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]
fn from(elem: DefinedCondition) -> Element
[src]
impl From<Failure> for Element
[src]
impl From<DefinedCondition> for Element
[src]
fn from(elem: DefinedCondition) -> Element
[src]
impl From<StanzaError> for Element
[src]
fn from(err: StanzaError) -> 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]
fn from(elem: DiscoInfoQuery) -> Element
[src]
impl From<Feature> for Element
[src]
impl From<Identity> for Element
[src]
impl From<DiscoInfoResult> for Element
[src]
fn from(disco: DiscoInfoResult) -> Element
[src]
impl From<DiscoItemsQuery> for Element
[src]
fn from(elem: DiscoItemsQuery) -> Element
[src]
impl From<Item> for Element
[src]
impl From<DiscoItemsResult> for Element
[src]
fn from(elem: DiscoItemsResult) -> 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]
fn from(elem: Conference) -> 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]
fn from(event: PubSubEvent) -> Element
[src]
impl From<Affiliations> for Element
[src]
fn from(elem: Affiliations) -> Element
[src]
impl From<Affiliation> for Element
[src]
fn from(elem: Affiliation) -> 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]
fn from(elem: PublishOptions) -> Element
[src]
impl From<Retract> for Element
[src]
impl From<SubscribeOptions> for Element
[src]
fn from(subscribe_options: SubscribeOptions) -> Element
[src]
impl From<Subscribe> for Element
[src]
impl From<Subscriptions> for Element
[src]
fn from(elem: Subscriptions) -> Element
[src]
impl From<SubscriptionElem> for Element
[src]
fn from(elem: SubscriptionElem) -> Element
[src]
impl From<Unsubscribe> for Element
[src]
fn from(elem: Unsubscribe) -> Element
[src]
impl From<PubSub> for Element
[src]
impl From<XhtmlIm> 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]
fn from(_: VersionQuery) -> Element
[src]
impl From<VersionResult> for Element
[src]
fn from(elem: VersionResult) -> 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<Artist> for Element
[src]
impl From<Length> for Element
[src]
impl From<Rating> for Element
[src]
impl From<Source> for Element
[src]
impl From<Title> for Element
[src]
impl From<Track> for Element
[src]
impl From<Uri> for Element
[src]
impl From<Tune> for Element
[src]
impl From<Content> for Element
[src]
impl From<Reason> for Element
[src]
impl From<ReasonElement> for Element
[src]
fn from(reason: ReasonElement) -> Element
[src]
impl From<Jingle> for Element
[src]
impl From<Description> for Element
[src]
fn from(elem: Description) -> Element
[src]
impl From<PayloadType> for Element
[src]
fn from(elem: PayloadType) -> 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]
fn from(_: BlocklistRequest) -> Element
[src]
impl From<BlocklistResult> for Element
[src]
fn from(elem: BlocklistResult) -> 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]
fn from(_: StreamManagement) -> Element
[src]
impl From<Ping> for Element
[src]
impl From<TimeQuery> for Element
[src]
impl From<TimeResult> for Element
[src]
fn from(time: TimeResult) -> Element
[src]
impl From<Delay> for Element
[src]
impl From<URI> for Element
[src]
impl From<MediaElement> for Element
[src]
fn from(elem: MediaElement) -> Element
[src]
impl From<Attention> for Element
[src]
impl From<Data> for Element
[src]
impl From<Range> for Element
[src]
impl From<File> for Element
[src]
impl From<Description> for Element
[src]
fn from(description: Description) -> 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<Enable> for Element
[src]
impl From<Disable> for Element
[src]
impl From<Private> for Element
[src]
impl From<Received> for Element
[src]
impl From<Sent> 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]
fn from(elem: Fingerprint) -> 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]
fn from(elem: ExplicitMessageEncryption) -> Element
[src]
impl From<ECaps2> for Element
[src]
impl TryFrom<Element> for BindQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<BindQuery, Error>
[src]
impl TryFrom<Element> for BindResponse
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<BindResponse, Error>
[src]
impl TryFrom<Element> for Iq
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(root: Element) -> Result<Iq, Error>
[src]
impl TryFrom<Element> for Body
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Body, Error>
[src]
impl TryFrom<Element> for Subject
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Subject, Error>
[src]
impl TryFrom<Element> for Thread
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Thread, Error>
[src]
impl TryFrom<Element> for Message
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(root: Element) -> Result<Message, Error>
[src]
impl TryFrom<Element> for Presence
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(root: Element) -> Result<Presence, Error>
[src]
impl TryFrom<Element> for Auth
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Auth, Error>
[src]
impl TryFrom<Element> for Challenge
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Challenge, Error>
[src]
impl TryFrom<Element> for Response
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Response, Error>
[src]
impl TryFrom<Element> for Abort
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Abort, Error>
[src]
impl TryFrom<Element> for Success
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Success, Error>
[src]
impl TryFrom<Element> for DefinedCondition
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DefinedCondition, Error>
[src]
impl TryFrom<Element> for Failure
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(root: Element) -> Result<Failure, Error>
[src]
impl TryFrom<Element> for DefinedCondition
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DefinedCondition, Error>
[src]
impl TryFrom<Element> for StanzaError
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<StanzaError, Error>
[src]
impl TryFrom<Element> for Stream
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Stream, Error>
[src]
impl TryFrom<Element> for Group
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Group, Error>
[src]
impl TryFrom<Element> for Item
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Item, Error>
[src]
impl TryFrom<Element> for Roster
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Roster, Error>
[src]
impl TryFrom<Element> for Open
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Open, Error>
[src]
impl TryFrom<Element> for Option_
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Option_, Error>
[src]
impl TryFrom<Element> for Field
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Field, Error>
[src]
impl TryFrom<Element> for DataForm
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DataForm, Error>
[src]
impl TryFrom<Element> for DiscoInfoQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DiscoInfoQuery, Error>
[src]
impl TryFrom<Element> for Feature
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Feature, Error>
[src]
impl TryFrom<Element> for Identity
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Identity, Error>
[src]
impl TryFrom<Element> for DiscoInfoResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DiscoInfoResult, Error>
[src]
impl TryFrom<Element> for DiscoItemsQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DiscoItemsQuery, Error>
[src]
impl TryFrom<Element> for Item
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Item, Error>
[src]
impl TryFrom<Element> for DiscoItemsResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<DiscoItemsResult, Error>
[src]
impl TryFrom<Element> for History
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<History, Error>
[src]
impl TryFrom<Element> for Muc
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Muc, Error>
[src]
impl TryFrom<Element> for Status
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Status, Error>
[src]
impl TryFrom<Element> for Actor
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Actor, Error>
[src]
impl TryFrom<Element> for Continue
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Continue, Error>
[src]
impl TryFrom<Element> for Reason
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Reason, Error>
[src]
impl TryFrom<Element> for Item
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Item, Error>
[src]
impl TryFrom<Element> for MucUser
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<MucUser, Error>
[src]
impl TryFrom<Element> for Open
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Open, Error>
[src]
impl TryFrom<Element> for Data
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Data, Error>
[src]
impl TryFrom<Element> for Close
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Close, Error>
[src]
impl TryFrom<Element> for Conference
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Conference, Error>
[src]
impl TryFrom<Element> for Url
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Url, Error>
[src]
impl TryFrom<Element> for Storage
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Storage, Error>
[src]
impl TryFrom<Element> for SetQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<SetQuery, Error>
[src]
impl TryFrom<Element> for SetResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<SetResult, Error>
[src]
impl TryFrom<Element> for Item
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Item, Error>
[src]
impl TryFrom<Element> for PubSubEvent
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<PubSubEvent, Error>
[src]
impl TryFrom<Element> for Affiliations
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Affiliations, Error>
[src]
impl TryFrom<Element> for Affiliation
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Affiliation, Error>
[src]
impl TryFrom<Element> for Configure
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Configure, Error>
[src]
impl TryFrom<Element> for Create
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Create, Error>
[src]
impl TryFrom<Element> for Default
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Default, Error>
[src]
impl TryFrom<Element> for Items
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Items, Error>
[src]
impl TryFrom<Element> for Item
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Item, Error>
[src]
impl TryFrom<Element> for Options
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Options, Error>
[src]
impl TryFrom<Element> for Publish
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Publish, Error>
[src]
impl TryFrom<Element> for PublishOptions
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<PublishOptions, Error>
[src]
impl TryFrom<Element> for Retract
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Retract, Error>
[src]
impl TryFrom<Element> for SubscribeOptions
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Self, Error>
[src]
impl TryFrom<Element> for Subscribe
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Subscribe, Error>
[src]
impl TryFrom<Element> for Subscriptions
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Subscriptions, Error>
[src]
impl TryFrom<Element> for SubscriptionElem
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<SubscriptionElem, Error>
[src]
impl TryFrom<Element> for Unsubscribe
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Unsubscribe, Error>
[src]
impl TryFrom<Element> for PubSub
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<PubSub, Error>
[src]
impl TryFrom<Element> for XhtmlIm
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<XhtmlIm, Error>
[src]
impl TryFrom<Element> for Query
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Query, Error>
[src]
impl TryFrom<Element> for Metadata
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Metadata, Error>
[src]
impl TryFrom<Element> for Info
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Info, Error>
[src]
impl TryFrom<Element> for Data
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Data, Error>
[src]
impl TryFrom<Element> for ChatState
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<ChatState, Error>
[src]
impl TryFrom<Element> for VersionQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<VersionQuery, Error>
[src]
impl TryFrom<Element> for VersionResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<VersionResult, Error>
[src]
impl TryFrom<Element> for MoodEnum
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<MoodEnum, Error>
[src]
impl TryFrom<Element> for Text
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Text, Error>
[src]
impl TryFrom<Element> for Handshake
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Handshake, Error>
[src]
impl TryFrom<Element> for Caps
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Caps, Error>
[src]
impl TryFrom<Element> for Artist
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Artist, Error>
[src]
impl TryFrom<Element> for Length
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Length, Error>
[src]
impl TryFrom<Element> for Rating
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Rating, Error>
[src]
impl TryFrom<Element> for Source
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Source, Error>
[src]
impl TryFrom<Element> for Title
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Title, Error>
[src]
impl TryFrom<Element> for Track
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Track, Error>
[src]
impl TryFrom<Element> for Uri
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Uri, Error>
[src]
impl TryFrom<Element> for Tune
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Tune, Error>
[src]
impl TryFrom<Element> for Content
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Content, Error>
[src]
impl TryFrom<Element> for ReasonElement
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<ReasonElement, Error>
[src]
impl TryFrom<Element> for Jingle
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(root: Element) -> Result<Jingle, Error>
[src]
impl TryFrom<Element> for Description
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Description, Error>
[src]
impl TryFrom<Element> for PayloadType
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<PayloadType, Error>
[src]
impl TryFrom<Element> for Parameter
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Parameter, Error>
[src]
impl TryFrom<Element> for Nick
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Nick, Error>
[src]
impl TryFrom<Element> for Transport
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Transport, Error>
[src]
impl TryFrom<Element> for Candidate
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Candidate, Error>
[src]
impl TryFrom<Element> for Request
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Request, Error>
[src]
impl TryFrom<Element> for Received
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Received, Error>
[src]
impl TryFrom<Element> for BlocklistRequest
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<BlocklistRequest, Error>
[src]
impl TryFrom<Element> for BlocklistResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<BlocklistResult, Error>
[src]
impl TryFrom<Element> for Block
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Block, Error>
[src]
impl TryFrom<Element> for Unblock
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Unblock, Error>
[src]
impl TryFrom<Element> for Blocked
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Blocked, Error>
[src]
impl TryFrom<Element> for A
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<A, Error>
[src]
impl TryFrom<Element> for Enable
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Enable, Error>
[src]
impl TryFrom<Element> for Enabled
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Enabled, Error>
[src]
impl TryFrom<Element> for Failed
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Failed, Error>
[src]
impl TryFrom<Element> for R
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<R, Error>
[src]
impl TryFrom<Element> for Resume
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Resume, Error>
[src]
impl TryFrom<Element> for Resumed
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Resumed, Error>
[src]
impl TryFrom<Element> for StreamManagement
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<StreamManagement, Error>
[src]
impl TryFrom<Element> for Ping
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Ping, Error>
[src]
impl TryFrom<Element> for TimeQuery
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<TimeQuery, Error>
[src]
impl TryFrom<Element> for TimeResult
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<TimeResult, Error>
[src]
impl TryFrom<Element> for Delay
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Delay, Error>
[src]
impl TryFrom<Element> for URI
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<URI, Error>
[src]
impl TryFrom<Element> for MediaElement
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<MediaElement, Error>
[src]
impl TryFrom<Element> for Attention
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Attention, Error>
[src]
impl TryFrom<Element> for Data
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Data, Error>
[src]
impl TryFrom<Element> for Range
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Range, Error>
[src]
impl TryFrom<Element> for File
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<File, Error>
[src]
impl TryFrom<Element> for Description
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Description, Error>
[src]
impl TryFrom<Element> for Checksum
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Checksum, Error>
[src]
impl TryFrom<Element> for Received
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Received, Error>
[src]
impl TryFrom<Element> for Candidate
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Candidate, Error>
[src]
impl TryFrom<Element> for Transport
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Transport, Error>
[src]
impl TryFrom<Element> for Transport
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Transport, Error>
[src]
impl TryFrom<Element> for Enable
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Enable, Error>
[src]
impl TryFrom<Element> for Disable
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Disable, Error>
[src]
impl TryFrom<Element> for Private
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Private, Error>
[src]
impl TryFrom<Element> for Received
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Received, Error>
[src]
impl TryFrom<Element> for Sent
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Sent, Error>
[src]
impl TryFrom<Element> for Forwarded
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Forwarded, Error>
[src]
impl TryFrom<Element> for Hash
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Hash, Error>
[src]
impl TryFrom<Element> for Replace
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Replace, Error>
[src]
impl TryFrom<Element> for Query
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Query, Error>
[src]
impl TryFrom<Element> for Result_
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Result_, Error>
[src]
impl TryFrom<Element> for Fin
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Fin, Error>
[src]
impl TryFrom<Element> for Prefs
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Prefs, Error>
[src]
impl TryFrom<Element> for Idle
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Idle, Error>
[src]
impl TryFrom<Element> for Fingerprint
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<Fingerprint, Error>
[src]
impl TryFrom<Element> for JingleMI
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<JingleMI, Error>
[src]
impl TryFrom<Element> for StanzaId
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<StanzaId, Error>
[src]
impl TryFrom<Element> for OriginId
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<OriginId, Error>
[src]
impl TryFrom<Element> for ExplicitMessageEncryption
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(elem: Element) -> Result<ExplicitMessageEncryption, Error>
[src]
impl TryFrom<Element> for ECaps2
[src]
Auto Trait Implementations
impl !Send for Element
impl Unpin for Element
impl !Sync for Element
impl !UnwindSafe for Element
impl !RefUnwindSafe for Element
Blanket Implementations
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> From<T> for 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self