196 lines
86 KiB
HTML
196 lines
86 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A node in a document."><title>Node in roxmltree - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="roxmltree" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../roxmltree/index.html">roxmltree</a><span class="version">0.20.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Node</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#document-order" title="Document Order">Document Order</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.ancestors" title="ancestors">ancestors</a></li><li><a href="#method.attribute" title="attribute">attribute</a></li><li><a href="#method.attribute_node" title="attribute_node">attribute_node</a></li><li><a href="#method.attributes" title="attributes">attributes</a></li><li><a href="#method.children" title="children">children</a></li><li><a href="#method.default_namespace" title="default_namespace">default_namespace</a></li><li><a href="#method.descendants" title="descendants">descendants</a></li><li><a href="#method.document" title="document">document</a></li><li><a href="#method.first_child" title="first_child">first_child</a></li><li><a href="#method.first_children" title="first_children">first_children</a></li><li><a href="#method.first_element_child" title="first_element_child">first_element_child</a></li><li><a href="#method.has_attribute" title="has_attribute">has_attribute</a></li><li><a href="#method.has_children" title="has_children">has_children</a></li><li><a href="#method.has_siblings" title="has_siblings">has_siblings</a></li><li><a href="#method.has_tag_name" title="has_tag_name">has_tag_name</a></li><li><a href="#method.id" title="id">id</a></li><li><a href="#method.is_comment" title="is_comment">is_comment</a></li><li><a href="#method.is_element" title="is_element">is_element</a></li><li><a href="#method.is_pi" title="is_pi">is_pi</a></li><li><a href="#method.is_root" title="is_root">is_root</a></li><li><a href="#method.is_text" title="is_text">is_text</a></li><li><a href="#method.last_child" title="last_child">last_child</a></li><li><a href="#method.last_children" title="last_children">last_children</a></li><li><a href="#method.last_element_child" title="last_element_child">last_element_child</a></li><li><a href="#method.lookup_namespace_uri" title="lookup_namespace_uri">lookup_namespace_uri</a></li><li><a href="#method.lookup_prefix" title="lookup_prefix">lookup_prefix</a></li><li><a href="#method.namespaces" title="namespaces">namespaces</a></li><li><a href="#method.next_sibling" title="next_sibling">next_sibling</a></li><li><a href="#method.next_sibling_element" title="next_sibling_element">next_sibling_element</a></li><li><a href="#method.next_siblings" title="next_siblings">next_siblings</a></li><li><a href="#method.node_type" title="node_type">node_type</a></li><li><a href="#method.parent" title="parent">parent</a></li><li><a href="#method.parent_element" title="parent_element">parent_element</a></li><li><a href="#method.pi" title="pi">pi</a></li><li><a href="#method.prev_sibling" title="prev_sibling">prev_sibling</a></li><li><a href="#method.prev_sibling_element" title="prev_sibling_element">prev_sibling_element</a></li><li><a href="#method.prev_siblings" title="prev_siblings">prev_siblings</a></li><li><a href="#method.range" title="range">range</a></li><li><a href="#method.tag_name" title="tag_name">tag_name</a></li><li><a href="#method.tail" title="tail">tail</a></li><li><a href="#method.tail_storage" title="tail_storage">tail_storage</a></li><li><a href="#method.text" title="text">text</a></li><li><a href="#method.text_storage" title="text_storage">text_storage</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Node%3C'a,+'input%3E" title="Clone">Clone</a></li><li><a href="#impl-Copy-for-Node%3C'a,+'input%3E" title="Copy">Copy</a></li><li><a href="#impl-Debug-for-Node%3C'a,+'input%3E" title="Debug">Debug</a></li><li><a href="#impl-Eq-for-Node%3C'_,+'_%3E" title="Eq">Eq</a></li><li><a href="#impl-Hash-for-Node%3C'_,+'_%3E" title="Hash">Hash</a></li><li><a href="#impl-Ord-for-Node%3C'_,+'_%3E" title="Ord">Ord</a></li><li><a href="#impl-PartialEq-for-Node%3C'_,+'_%3E" title="PartialEq">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Node%3C'_,+'_%3E" title="PartialOrd">PartialOrd</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Node%3C'a,+'input%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Node%3C'a,+'input%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Node%3C'a,+'input%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-Node%3C'a,+'input%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Node%3C'a,+'input%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Node%3C'a,+'input%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate roxmltree</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">roxmltree</a></span><h1>Struct <span class="struct">Node</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/roxmltree/lib.rs.html#900-909">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Node<'a, 'input: 'a> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A node in a document.</p>
|
||
<h2 id="document-order"><a class="doc-anchor" href="#document-order">§</a>Document Order</h2>
|
||
<p>The implementation of the <code>Ord</code> traits for <code>Node</code> is based on the concept of <em>document-order</em>.
|
||
In layman’s terms, document-order is the order in which one would see each element if
|
||
one opened a document in a text editor or web browser and scrolled down.
|
||
Document-order convention is followed in XPath, CSS Counters, and DOM selectors API
|
||
to ensure consistent results from selection.
|
||
One difference in <code>roxmltree</code> is that there is the notion of more than one document
|
||
in existence at a time. While Nodes within the same document are in document-order,
|
||
Nodes in different documents will be grouped together, but not in any particular
|
||
order.</p>
|
||
<p>As an example, if we have a Document <code>a</code> with Nodes <code>[a0, a1, a2]</code> and a
|
||
Document <code>b</code> with Nodes <code>[b0, b1]</code>, these Nodes in order could be either
|
||
<code>[a0, a1, a2, b0, b1]</code> or <code>[b0, b1, a0, a1, a2]</code> and roxmltree makes no
|
||
guarantee which it will be.</p>
|
||
<p>Document-order is defined here in the
|
||
<a href="https://www.w3.org/TR/xpath-3/#id-document-order">W3C XPath Recommendation</a>
|
||
The use of document-order in DOM Selectors is described here in the
|
||
<a href="https://www.w3.org/TR/selectors-api/#the-apis">W3C Selectors API Level 1</a></p>
|
||
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Node%3C'a,+'input%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#940-1463">Source</a><a href="#impl-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input: 'a> <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.node_type" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#943-951">Source</a><h4 class="code-header">pub fn <a href="#method.node_type" class="fn">node_type</a>(&self) -> <a class="enum" href="enum.NodeType.html" title="enum roxmltree::NodeType">NodeType</a></h4></section></summary><div class="docblock"><p>Returns node’s type.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_root" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#955-957">Source</a><h4 class="code-header">pub fn <a href="#method.is_root" class="fn">is_root</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that node is a root node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_element" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#961-963">Source</a><h4 class="code-header">pub fn <a href="#method.is_element" class="fn">is_element</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that node is an element node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_pi" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#967-969">Source</a><h4 class="code-header">pub fn <a href="#method.is_pi" class="fn">is_pi</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that node is a processing instruction node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_comment" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#973-975">Source</a><h4 class="code-header">pub fn <a href="#method.is_comment" class="fn">is_comment</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that node is a comment node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_text" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#979-981">Source</a><h4 class="code-header">pub fn <a href="#method.is_text" class="fn">is_text</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that node is a text node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.document" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#985-987">Source</a><h4 class="code-header">pub fn <a href="#method.document" class="fn">document</a>(&self) -> &'a <a class="struct" href="struct.Document.html" title="struct roxmltree::Document">Document</a><'input></h4></section></summary><div class="docblock"><p>Returns node’s document.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.tag_name" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1002-1007">Source</a><h4 class="code-header">pub fn <a href="#method.tag_name" class="fn">tag_name</a>(&self) -> <a class="struct" href="struct.ExpandedName.html" title="struct roxmltree::ExpandedName">ExpandedName</a><'a, 'input></h4></section></summary><div class="docblock"><p>Returns node’s tag name.</p>
|
||
<p>Returns an empty name with no namespace if the current node is not an element.</p>
|
||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().tag_name().namespace(), <span class="prelude-val">Some</span>(<span class="string">"http://www.w3.org"</span>));
|
||
<span class="macro">assert_eq!</span>(doc.root_element().tag_name().name(), <span class="string">"e"</span>);</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_tag_name" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1022-1035">Source</a><h4 class="code-header">pub fn <a href="#method.has_tag_name" class="fn">has_tag_name</a><'n, 'm, N>(&self, name: N) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a><div class="where">where
|
||
N: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ExpandedName.html" title="struct roxmltree::ExpandedName">ExpandedName</a><'n, 'm>>,</div></h4></section></summary><div class="docblock"><p>Checks that node has a specified tag name.</p>
|
||
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert!</span>(doc.root_element().has_tag_name(<span class="string">"e"</span>));
|
||
<span class="macro">assert!</span>(doc.root_element().has_tag_name((<span class="string">"http://www.w3.org"</span>, <span class="string">"e"</span>)));
|
||
|
||
<span class="macro">assert!</span>(!doc.root_element().has_tag_name(<span class="string">"b"</span>));
|
||
<span class="macro">assert!</span>(!doc.root_element().has_tag_name((<span class="string">"http://www.w4.org"</span>, <span class="string">"e"</span>)));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.default_namespace" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1052-1056">Source</a><h4 class="code-header">pub fn <a href="#method.default_namespace" class="fn">default_namespace</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Returns node’s default namespace URI.</p>
|
||
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().default_namespace(), <span class="prelude-val">Some</span>(<span class="string">"http://www.w3.org"</span>));</code></pre></div>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns:n='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().default_namespace(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_prefix" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1073-1082">Source</a><h4 class="code-header">pub fn <a href="#method.lookup_prefix" class="fn">lookup_prefix</a>(&self, uri: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'input <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Returns a prefix for a given namespace URI.</p>
|
||
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns:n='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().lookup_prefix(<span class="string">"http://www.w3.org"</span>), <span class="prelude-val">Some</span>(<span class="string">"n"</span>));</code></pre></div>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns:n=''/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().lookup_prefix(<span class="string">""</span>), <span class="prelude-val">Some</span>(<span class="string">"n"</span>));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_namespace_uri" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1099-1103">Source</a><h4 class="code-header">pub fn <a href="#method.lookup_namespace_uri" class="fn">lookup_namespace_uri</a>(&self, prefix: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Returns an URI for a given prefix.</p>
|
||
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns:n='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().lookup_namespace_uri(<span class="prelude-val">Some</span>(<span class="string">"n"</span>)), <span class="prelude-val">Some</span>(<span class="string">"http://www.w3.org"</span>));</code></pre></div>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e xmlns='http://www.w3.org'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().lookup_namespace_uri(<span class="prelude-val">None</span>), <span class="prelude-val">Some</span>(<span class="string">"http://www.w3.org"</span>));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.attribute" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1123-1131">Source</a><h4 class="code-header">pub fn <a href="#method.attribute" class="fn">attribute</a><'n, 'm, N>(&self, name: N) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>><div class="where">where
|
||
N: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ExpandedName.html" title="struct roxmltree::ExpandedName">ExpandedName</a><'n, 'm>>,</div></h4></section></summary><div class="docblock"><p>Returns element’s attribute value.</p>
|
||
<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<e a='b'/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().attribute(<span class="string">"a"</span>), <span class="prelude-val">Some</span>(<span class="string">"b"</span>));</code></pre></div>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(
|
||
<span class="string">"<e xmlns:n='http://www.w3.org' a='b' n:a='c'/>"
|
||
</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().attribute(<span class="string">"a"</span>), <span class="prelude-val">Some</span>(<span class="string">"b"</span>));
|
||
<span class="macro">assert_eq!</span>(doc.root_element().attribute((<span class="string">"http://www.w3.org"</span>, <span class="string">"a"</span>)), <span class="prelude-val">Some</span>(<span class="string">"c"</span>));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.attribute_node" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1138-1145">Source</a><h4 class="code-header">pub fn <a href="#method.attribute_node" class="fn">attribute_node</a><'n, 'm, N>(
|
||
&self,
|
||
name: N,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Attribute.html" title="struct roxmltree::Attribute">Attribute</a><'a, 'input>><div class="where">where
|
||
N: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ExpandedName.html" title="struct roxmltree::ExpandedName">ExpandedName</a><'n, 'm>>,</div></h4></section></summary><div class="docblock"><p>Returns element’s attribute object.</p>
|
||
<p>The same as <a href="struct.Node.html#method.attribute"><code>attribute()</code></a>, but returns the <code>Attribute</code> itself instead of a value string.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_attribute" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1162-1169">Source</a><h4 class="code-header">pub fn <a href="#method.has_attribute" class="fn">has_attribute</a><'n, 'm, N>(&self, name: N) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a><div class="where">where
|
||
N: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ExpandedName.html" title="struct roxmltree::ExpandedName">ExpandedName</a><'n, 'm>>,</div></h4></section></summary><div class="docblock"><p>Checks that element has a specified attribute.</p>
|
||
<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(
|
||
<span class="string">"<e xmlns:n='http://www.w3.org' a='b' n:a='c'/>"
|
||
</span>).unwrap();
|
||
|
||
<span class="macro">assert!</span>(doc.root_element().has_attribute(<span class="string">"a"</span>));
|
||
<span class="macro">assert!</span>(doc.root_element().has_attribute((<span class="string">"http://www.w3.org"</span>, <span class="string">"a"</span>)));
|
||
|
||
<span class="macro">assert!</span>(!doc.root_element().has_attribute(<span class="string">"b"</span>));
|
||
<span class="macro">assert!</span>(!doc.root_element().has_attribute((<span class="string">"http://www.w4.org"</span>, <span class="string">"a"</span>)));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.attributes" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1183-1185">Source</a><h4 class="code-header">pub fn <a href="#method.attributes" class="fn">attributes</a>(&self) -> <a class="struct" href="struct.Attributes.html" title="struct roxmltree::Attributes">Attributes</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="Attributes<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns element’s attributes.</p>
|
||
<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(
|
||
<span class="string">"<e xmlns:n='http://www.w3.org' a='b' n:a='c'/>"
|
||
</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().attributes().len(), <span class="number">2</span>);</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.namespaces" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1199-1211">Source</a><h4 class="code-header">pub fn <a href="#method.namespaces" class="fn">namespaces</a>(&self) -> <a class="struct" href="struct.NamespaceIter.html" title="struct roxmltree::NamespaceIter">NamespaceIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="NamespaceIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns element’s namespaces.</p>
|
||
<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(
|
||
<span class="string">"<e xmlns:n='http://www.w3.org'/>"
|
||
</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().namespaces().len(), <span class="number">1</span>);</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.text" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1240-1242">Source</a><h4 class="code-header">pub fn <a href="#method.text" class="fn">text</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Returns node’s text.</p>
|
||
<ul>
|
||
<li>for an element will return a first text child</li>
|
||
<li>for a comment will return a self text</li>
|
||
<li>for a text node will return a self text</li>
|
||
</ul>
|
||
<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"\
|
||
<p>
|
||
text
|
||
</p>
|
||
"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root_element().text(),
|
||
<span class="prelude-val">Some</span>(<span class="string">"\n text\n"</span>));
|
||
<span class="macro">assert_eq!</span>(doc.root_element().first_child().unwrap().text(),
|
||
<span class="prelude-val">Some</span>(<span class="string">"\n text\n"</span>));</code></pre></div>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"<!-- comment --><e/>"</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(doc.root().first_child().unwrap().text(), <span class="prelude-val">Some</span>(<span class="string">" comment "</span>));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.text_storage" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1247-1260">Source</a><h4 class="code-header">pub fn <a href="#method.text_storage" class="fn">text_storage</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="enum" href="enum.StringStorage.html" title="enum roxmltree::StringStorage">StringStorage</a><'input>></h4></section></summary><div class="docblock"><p>Returns node’s text storage.</p>
|
||
<p>Useful when you need a more low-level access to an allocated string.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.tail" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1279-1281">Source</a><h4 class="code-header">pub fn <a href="#method.tail" class="fn">tail</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Returns element’s tail text.</p>
|
||
<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>doc = roxmltree::Document::parse(<span class="string">"\
|
||
<root>
|
||
text1
|
||
<p/>
|
||
text2
|
||
</root>
|
||
"</span>).unwrap();
|
||
|
||
<span class="kw">let </span>p = doc.descendants().find(|n| n.has_tag_name(<span class="string">"p"</span>)).unwrap();
|
||
<span class="macro">assert_eq!</span>(p.tail(), <span class="prelude-val">Some</span>(<span class="string">"\n text2\n"</span>));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.tail_storage" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1286-1298">Source</a><h4 class="code-header">pub fn <a href="#method.tail_storage" class="fn">tail_storage</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="enum" href="enum.StringStorage.html" title="enum roxmltree::StringStorage">StringStorage</a><'input>></h4></section></summary><div class="docblock"><p>Returns element’s tail text storage.</p>
|
||
<p>Useful when you need a more low-level access to an allocated string.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pi" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1302-1307">Source</a><h4 class="code-header">pub fn <a href="#method.pi" class="fn">pi</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.PI.html" title="struct roxmltree::PI">PI</a><'input>></h4></section></summary><div class="docblock"><p>Returns node as Processing Instruction.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.parent" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1311-1313">Source</a><h4 class="code-header">pub fn <a href="#method.parent" class="fn">parent</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the parent of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.parent_element" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1316-1318">Source</a><h4 class="code-header">pub fn <a href="#method.parent_element" class="fn">parent_element</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the parent element of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.prev_sibling" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1322-1324">Source</a><h4 class="code-header">pub fn <a href="#method.prev_sibling" class="fn">prev_sibling</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the previous sibling of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.prev_sibling_element" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1327-1329">Source</a><h4 class="code-header">pub fn <a href="#method.prev_sibling_element" class="fn">prev_sibling_element</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the previous sibling element of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.next_sibling" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1333-1348">Source</a><h4 class="code-header">pub fn <a href="#method.next_sibling" class="fn">next_sibling</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the next sibling of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.next_sibling_element" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1351-1353">Source</a><h4 class="code-header">pub fn <a href="#method.next_sibling_element" class="fn">next_sibling_element</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the next sibling element of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.first_child" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1357-1361">Source</a><h4 class="code-header">pub fn <a href="#method.first_child" class="fn">first_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the first child of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.first_element_child" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1364-1366">Source</a><h4 class="code-header">pub fn <a href="#method.first_element_child" class="fn">first_element_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the first element child of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.last_child" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1370-1372">Source</a><h4 class="code-header">pub fn <a href="#method.last_child" class="fn">last_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the last child of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.last_element_child" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1375-1377">Source</a><h4 class="code-header">pub fn <a href="#method.last_element_child" class="fn">last_element_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Returns the last element child of this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_siblings" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1381-1383">Source</a><h4 class="code-header">pub fn <a href="#method.has_siblings" class="fn">has_siblings</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this node has siblings.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_children" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1387-1389">Source</a><h4 class="code-header">pub fn <a href="#method.has_children" class="fn">has_children</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this node has children.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.ancestors" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1393-1398">Source</a><h4 class="code-header">pub fn <a href="#method.ancestors" class="fn">ancestors</a>(&self) -> <a class="struct" href="struct.AxisIter.html" title="struct roxmltree::AxisIter">AxisIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="AxisIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over ancestor nodes starting at this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.prev_siblings" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1402-1407">Source</a><h4 class="code-header">pub fn <a href="#method.prev_siblings" class="fn">prev_siblings</a>(&self) -> <a class="struct" href="struct.AxisIter.html" title="struct roxmltree::AxisIter">AxisIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="AxisIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over previous sibling nodes starting at this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.next_siblings" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1411-1416">Source</a><h4 class="code-header">pub fn <a href="#method.next_siblings" class="fn">next_siblings</a>(&self) -> <a class="struct" href="struct.AxisIter.html" title="struct roxmltree::AxisIter">AxisIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="AxisIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over next sibling nodes starting at this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.first_children" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1420-1425">Source</a><h4 class="code-header">pub fn <a href="#method.first_children" class="fn">first_children</a>(&self) -> <a class="struct" href="struct.AxisIter.html" title="struct roxmltree::AxisIter">AxisIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="AxisIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over first children nodes starting at this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.last_children" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1429-1434">Source</a><h4 class="code-header">pub fn <a href="#method.last_children" class="fn">last_children</a>(&self) -> <a class="struct" href="struct.AxisIter.html" title="struct roxmltree::AxisIter">AxisIter</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="AxisIter<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over last children nodes starting at this node.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.children" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1438-1443">Source</a><h4 class="code-header">pub fn <a href="#method.children" class="fn">children</a>(&self) -> <a class="struct" href="struct.Children.html" title="struct roxmltree::Children">Children</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="Children<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over children nodes.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.descendants" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1447-1449">Source</a><h4 class="code-header">pub fn <a href="#method.descendants" class="fn">descendants</a>(&self) -> <a class="struct" href="struct.Descendants.html" title="struct roxmltree::Descendants">Descendants</a><'a, 'input> <a href="#" class="tooltip" data-notable-ty="Descendants<'a, 'input>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator over this node and its descendants.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.range" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1454-1456">Source</a><h4 class="code-header">pub fn <a href="#method.range" class="fn">range</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns node’s range in bytes in the original document.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.id" class="method"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1460-1462">Source</a><h4 class="code-header">pub fn <a href="#method.id" class="fn">id</a>(&self) -> <a class="struct" href="struct.NodeId.html" title="struct roxmltree::NodeId">NodeId</a></h4></section></summary><div class="docblock"><p>Returns node’s NodeId</p>
|
||
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Node%3C'a,+'input%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#899">Source</a><a href="#impl-Clone-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input: 'a> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#899">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#174">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: &Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Node%3C'a,+'input%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1465-1485">Source</a><a href="#impl-Debug-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input: 'a> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#1466-1484">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-Node%3C'_,+'_%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#932-938">Source</a><a href="#impl-Hash-for-Node%3C'_,+'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'_, '_></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#933-937">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><H: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut H</a>)</h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &[Self], state: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut H</a>)<div class="where">where
|
||
H: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.84.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Node%3C'_,+'_%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#926-930">Source</a><a href="#impl-Ord-for-Node%3C'_,+'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'_, '_></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#927-929">Source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &Self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.84.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#980-982">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1001-1003">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1027-1029">Source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Node%3C'_,+'_%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#913-918">Source</a><a href="#impl-PartialEq-for-Node%3C'_,+'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'_, '_></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#915-917">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#261">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Node%3C'_,+'_%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#920-924">Source</a><a href="#impl-PartialOrd-for-Node%3C'_,+'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'_, '_></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#921-923">Source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &Self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.84.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1335">Source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1353">Source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
|
||
<code><=</code> operator. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1371">Source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code>
|
||
operator. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/cmp.rs.html#1389">Source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
|
||
the <code>>=</code> operator. <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Node%3C'a,+'input%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#899">Source</a><a href="#impl-Copy-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input: 'a> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-Eq-for-Node%3C'_,+'_%3E" class="impl"><a class="src rightside" href="../src/roxmltree/lib.rs.html#911">Source</a><a href="#impl-Eq-for-Node%3C'_,+'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'_, '_></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-Freeze-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-RefUnwindSafe-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-Send-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-Send-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-Sync-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-Sync-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-Unpin-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-Unpin-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section><section id="impl-UnwindSafe-for-Node%3C'a,+'input%3E" class="impl"><a href="#impl-UnwindSafe-for-Node%3C'a,+'input%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'input> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Node.html" title="struct roxmltree::Node">Node</a><'a, 'input></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#273">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#275">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
||
<p>That is, this conversion is whatever the implementation of
|
||
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#82-84">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#86">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#87">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#91">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Attributes<'a, 'input>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Attributes.html\" title=\"struct roxmltree::Attributes\">Attributes</a><'a, 'input></code></h3><pre><code><div class=\"where\">impl<'a, 'input> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Attributes.html\" title=\"struct roxmltree::Attributes\">Attributes</a><'a, 'input></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.Attribute.html\" title=\"struct roxmltree::Attribute\">Attribute</a><'a, 'input>;</div>","AxisIter<'a, 'input>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AxisIter.html\" title=\"struct roxmltree::AxisIter\">AxisIter</a><'a, 'input></code></h3><pre><code><div class=\"where\">impl<'a, 'input: 'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.AxisIter.html\" title=\"struct roxmltree::AxisIter\">AxisIter</a><'a, 'input></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.Node.html\" title=\"struct roxmltree::Node\">Node</a><'a, 'input>;</div>","Children<'a, 'input>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Children.html\" title=\"struct roxmltree::Children\">Children</a><'a, 'input></code></h3><pre><code><div class=\"where\">impl<'a, 'input: 'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Children.html\" title=\"struct roxmltree::Children\">Children</a><'a, 'input></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.Node.html\" title=\"struct roxmltree::Node\">Node</a><'a, 'input>;</div>","Descendants<'a, 'input>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Descendants.html\" title=\"struct roxmltree::Descendants\">Descendants</a><'a, 'input></code></h3><pre><code><div class=\"where\">impl<'a, 'input> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Descendants.html\" title=\"struct roxmltree::Descendants\">Descendants</a><'a, 'input></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.Node.html\" title=\"struct roxmltree::Node\">Node</a><'a, 'input>;</div>","NamespaceIter<'a, 'input>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.NamespaceIter.html\" title=\"struct roxmltree::NamespaceIter\">NamespaceIter</a><'a, 'input></code></h3><pre><code><div class=\"where\">impl<'a, 'input> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.NamespaceIter.html\" title=\"struct roxmltree::NamespaceIter\">NamespaceIter</a><'a, 'input></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = &'a <a class=\"struct\" href=\"struct.Namespace.html\" title=\"struct roxmltree::Namespace\">Namespace</a><'input>;</div>"}</script></section></div></main></body></html> |