91 lines
63 KiB
HTML
91 lines
63 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="API documentation for the Rust `NodeRef` struct in crate `kuchiki`."><meta name="keywords" content="rust, rustlang, rust-lang, NodeRef"><title>kuchiki::NodeRef - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../kuchiki/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct NodeRef</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.ancestors">ancestors</a><a href="#method.append">append</a><a href="#method.children">children</a><a href="#method.descendants">descendants</a><a href="#method.following_siblings">following_siblings</a><a href="#method.inclusive_ancestors">inclusive_ancestors</a><a href="#method.inclusive_descendants">inclusive_descendants</a><a href="#method.inclusive_following_siblings">inclusive_following_siblings</a><a href="#method.inclusive_preceding_siblings">inclusive_preceding_siblings</a><a href="#method.insert_after">insert_after</a><a href="#method.insert_before">insert_before</a><a href="#method.into_comment_ref">into_comment_ref</a><a href="#method.into_doctype_ref">into_doctype_ref</a><a href="#method.into_document_ref">into_document_ref</a><a href="#method.into_element_ref">into_element_ref</a><a href="#method.into_text_ref">into_text_ref</a><a href="#method.new">new</a><a href="#method.new_comment">new_comment</a><a href="#method.new_doctype">new_doctype</a><a href="#method.new_document">new_document</a><a href="#method.new_element">new_element</a><a href="#method.new_processing_instruction">new_processing_instruction</a><a href="#method.new_text">new_text</a><a href="#method.preceding_siblings">preceding_siblings</a><a href="#method.prepend">prepend</a><a href="#method.select">select</a><a href="#method.select_first">select_first</a><a href="#method.serialize">serialize</a><a href="#method.serialize_to_file">serialize_to_file</a><a href="#method.text_contents">text_contents</a><a href="#method.traverse">traverse</a><a href="#method.traverse_inclusive">traverse_inclusive</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref<Target=Node></a><div class="sidebar-links"><a href="#method.as_comment">as_comment</a><a href="#method.as_doctype">as_doctype</a><a href="#method.as_document">as_document</a><a href="#method.as_element">as_element</a><a href="#method.as_text">as_text</a><a href="#method.data">data</a><a href="#method.detach">detach</a><a href="#method.first_child">first_child</a><a href="#method.last_child">last_child</a><a href="#method.next_sibling">next_sibling</a><a href="#method.parent">parent</a><a href="#method.previous_sibling">previous_sibling</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deref">Deref</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CNodeRef%3E">PartialEq<NodeRef></a><a href="#impl-Serialize">Serialize</a><a href="#impl-ToString">ToString</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>kuchiki</a></p><script>window.sidebarCurrent = {name: 'NodeRef', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/kuchiki/tree.rs.html#96' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>kuchiki</a>::<wbr><a class="struct" href=''>NodeRef</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct NodeRef(pub <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><<a class="struct" href="../kuchiki/struct.Node.html" title="struct kuchiki::Node">Node</a>>);</pre></div><div class='docblock'><p>A strong reference to a node.</p>
|
||
<p>A node is destroyed when the last strong reference to it dropped.</p>
|
||
<p>Each node holds a strong reference to its first child and next sibling (if any),
|
||
but only a weak reference to its last child, previous sibling, and parent.
|
||
This is to avoid strong reference cycles, which would cause memory leaks.</p>
|
||
<p>As a result, a single <code>NodeRef</code> is sufficient to keep alive a node
|
||
and nodes that are after it in tree order
|
||
(its descendants, its following siblings, and their descendants)
|
||
but not other nodes in a tree.</p>
|
||
<p>To avoid detroying nodes prematurely,
|
||
programs typically hold a strong reference to the root of a document
|
||
until they’re done with that document.</p>
|
||
</div><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/kuchiki/iter.rs.html#11-169' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inclusive_ancestors' class="method"><code>pub fn <a href='#method.inclusive_ancestors' class='fnname'>inclusive_ancestors</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Ancestors.html" title="struct kuchiki::iter::Ancestors">Ancestors</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#14-16' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node and its ancestors.</p>
|
||
</div><h4 id='method.ancestors' class="method"><code>pub fn <a href='#method.ancestors' class='fnname'>ancestors</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Ancestors.html" title="struct kuchiki::iter::Ancestors">Ancestors</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#20-22' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node’s ancestors.</p>
|
||
</div><h4 id='method.inclusive_preceding_siblings' class="method"><code>pub fn <a href='#method.inclusive_preceding_siblings' class='fnname'>inclusive_preceding_siblings</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/struct.Rev.html" title="struct core::iter::adapters::Rev">Rev</a><<a class="struct" href="../kuchiki/iter/struct.Siblings.html" title="struct kuchiki::iter::Siblings">Siblings</a>></code><a class='srclink' href='../src/kuchiki/iter.rs.html#26-45' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node and the siblings before it.</p>
|
||
</div><h4 id='method.preceding_siblings' class="method"><code>pub fn <a href='#method.preceding_siblings' class='fnname'>preceding_siblings</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/iter/adapters/struct.Rev.html" title="struct core::iter::adapters::Rev">Rev</a><<a class="struct" href="../kuchiki/iter/struct.Siblings.html" title="struct kuchiki::iter::Siblings">Siblings</a>></code><a class='srclink' href='../src/kuchiki/iter.rs.html#49-61' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node’s siblings before it.</p>
|
||
</div><h4 id='method.inclusive_following_siblings' class="method"><code>pub fn <a href='#method.inclusive_following_siblings' class='fnname'>inclusive_following_siblings</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Siblings.html" title="struct kuchiki::iter::Siblings">Siblings</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#65-83' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node and the siblings after it.</p>
|
||
</div><h4 id='method.following_siblings' class="method"><code>pub fn <a href='#method.following_siblings' class='fnname'>following_siblings</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Siblings.html" title="struct kuchiki::iter::Siblings">Siblings</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#87-98' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node’s siblings after it.</p>
|
||
</div><h4 id='method.children' class="method"><code>pub fn <a href='#method.children' class='fnname'>children</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Siblings.html" title="struct kuchiki::iter::Siblings">Siblings</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#102-111' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node’s children.</p>
|
||
</div><h4 id='method.inclusive_descendants' class="method"><code>pub fn <a href='#method.inclusive_descendants' class='fnname'>inclusive_descendants</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Descendants.html" title="struct kuchiki::iter::Descendants">Descendants</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#119-121' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node and its descendants, in tree order.</p>
|
||
<p>Parent nodes appear before the descendants.</p>
|
||
<p>Note: this is the <code>NodeEdge::Start</code> items from <code>traverse()</code>.</p>
|
||
</div><h4 id='method.descendants' class="method"><code>pub fn <a href='#method.descendants' class='fnname'>descendants</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Descendants.html" title="struct kuchiki::iter::Descendants">Descendants</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#129-131' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of references to this node’s descendants, in tree order.</p>
|
||
<p>Parent nodes appear before the descendants.</p>
|
||
<p>Note: this is the <code>NodeEdge::Start</code> items from <code>traverse()</code>.</p>
|
||
</div><h4 id='method.traverse_inclusive' class="method"><code>pub fn <a href='#method.traverse_inclusive' class='fnname'>traverse_inclusive</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Traverse.html" title="struct kuchiki::iter::Traverse">Traverse</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#136-141' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of the start and end edges of this node and its descendants,
|
||
in tree order.</p>
|
||
</div><h4 id='method.traverse' class="method"><code>pub fn <a href='#method.traverse' class='fnname'>traverse</a>(&self) -> <a class="struct" href="../kuchiki/iter/struct.Traverse.html" title="struct kuchiki::iter::Traverse">Traverse</a></code><a class='srclink' href='../src/kuchiki/iter.rs.html#146-155' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of the start and end edges of this node’s descendants,
|
||
in tree order.</p>
|
||
</div><h4 id='method.select' class="method"><code>pub fn <a href='#method.select' class='fnname'>select</a>(<br> &self, <br> selectors: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../kuchiki/iter/struct.Select.html" title="struct kuchiki::iter::Select">Select</a><<a class="struct" href="../kuchiki/iter/struct.Elements.html" title="struct kuchiki::iter::Elements">Elements</a><<a class="struct" href="../kuchiki/iter/struct.Descendants.html" title="struct kuchiki::iter::Descendants">Descendants</a>>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../src/kuchiki/iter.rs.html#159-161' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return an iterator of the inclusive descendants element that match the given selector list.</p>
|
||
</div><h4 id='method.select_first' class="method"><code>pub fn <a href='#method.select_first' class='fnname'>select_first</a>(<br> &self, <br> selectors: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="../kuchiki/struct.ElementData.html" title="struct kuchiki::ElementData">ElementData</a>>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../src/kuchiki/iter.rs.html#165-168' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return the first inclusive descendants element that match the given selector list.</p>
|
||
</div></div><h3 id='impl-1' class='impl'><code class='in-band'>impl <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-1' class='anchor'></a><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#6-36' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into_element_ref' class="method"><code>pub fn <a href='#method.into_element_ref' class='fnname'>into_element_ref</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="../kuchiki/struct.ElementData.html" title="struct kuchiki::ElementData">ElementData</a>>></code><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#9-11' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is an element, return a strong reference to element-specific data.</p>
|
||
</div><h4 id='method.into_text_ref' class="method"><code>pub fn <a href='#method.into_text_ref' class='fnname'>into_text_ref</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>></code><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#15-17' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a text node, return a strong reference to its contents.</p>
|
||
</div><h4 id='method.into_comment_ref' class="method"><code>pub fn <a href='#method.into_comment_ref' class='fnname'>into_comment_ref</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>></code><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#21-23' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a comment, return a strong reference to its contents.</p>
|
||
</div><h4 id='method.into_doctype_ref' class="method"><code>pub fn <a href='#method.into_doctype_ref' class='fnname'>into_doctype_ref</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="../kuchiki/struct.Doctype.html" title="struct kuchiki::Doctype">Doctype</a>>></code><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#27-29' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a doctype, return a strong reference to doctype-specific data.</p>
|
||
</div><h4 id='method.into_document_ref' class="method"><code>pub fn <a href='#method.into_document_ref' class='fnname'>into_document_ref</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeDataRef.html" title="struct kuchiki::NodeDataRef">NodeDataRef</a><<a class="struct" href="../kuchiki/struct.DocumentData.html" title="struct kuchiki::DocumentData">DocumentData</a>>></code><a class='srclink' href='../src/kuchiki/node_data_ref.rs.html#33-35' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a document, return a strong reference to document-specific data.</p>
|
||
</div></div><h3 id='impl-2' class='impl'><code class='in-band'>impl <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-2' class='anchor'></a><a class='srclink' href='../src/kuchiki/serializer.rs.html#85-105' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize' class="method"><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a><W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>>(&self, writer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>W) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../src/kuchiki/serializer.rs.html#88-97' title='goto source code'>[src]</a></h4><div class='docblock'><p>Serialize this node and its descendants in HTML syntax to the given stream.</p>
|
||
</div><h4 id='method.serialize_to_file' class="method"><code>pub fn <a href='#method.serialize_to_file' class='fnname'>serialize_to_file</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>>(&self, path: P) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../src/kuchiki/serializer.rs.html#101-104' title='goto source code'>[src]</a></h4><div class='docblock'><p>Serialize this node and its descendants in HTML syntax to a new file at the given path.</p>
|
||
</div></div><h3 id='impl-3' class='impl'><code class='in-band'>impl <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-3' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#195-284' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(data: <a class="enum" href="../kuchiki/enum.NodeData.html" title="enum kuchiki::NodeData">NodeData</a>) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#198-207' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new node.</p>
|
||
</div><h4 id='method.new_element' class="method"><code>pub fn <a href='#method.new_element' class='fnname'>new_element</a><I>(name: QualName, attributes: I) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a> <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../kuchiki/struct.ExpandedName.html" title="struct kuchiki::ExpandedName">ExpandedName</a>, <a class="struct" href="../kuchiki/struct.Attribute.html" title="struct kuchiki::Attribute">Attribute</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>, </span></code><a class='srclink' href='../src/kuchiki/tree.rs.html#211-226' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new element node.</p>
|
||
</div><h4 id='method.new_text' class="method"><code>pub fn <a href='#method.new_text' class='fnname'>new_text</a><T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(value: T) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#230-232' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new text node.</p>
|
||
</div><h4 id='method.new_comment' class="method"><code>pub fn <a href='#method.new_comment' class='fnname'>new_comment</a><T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(value: T) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#236-238' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new comment node.</p>
|
||
</div><h4 id='method.new_processing_instruction' class="method"><code>pub fn <a href='#method.new_processing_instruction' class='fnname'>new_processing_instruction</a><T1, T2>(target: T1, data: T2) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a> <span class="where fmt-newline">where<br> T1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,<br> T2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, </span></code><a class='srclink' href='../src/kuchiki/tree.rs.html#242-251' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new processing instruction node.</p>
|
||
</div><h4 id='method.new_doctype' class="method"><code>pub fn <a href='#method.new_doctype' class='fnname'>new_doctype</a><T1, T2, T3>(<br> name: T1, <br> public_id: T2, <br> system_id: T3<br>) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a> <span class="where fmt-newline">where<br> T1: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,<br> T2: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,<br> T3: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, </span></code><a class='srclink' href='../src/kuchiki/tree.rs.html#255-266' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new doctype node.</p>
|
||
</div><h4 id='method.new_document' class="method"><code>pub fn <a href='#method.new_document' class='fnname'>new_document</a>() -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#270-274' title='goto source code'>[src]</a></h4><div class='docblock'><p>Create a new document node.</p>
|
||
</div><h4 id='method.text_contents' class="method"><code>pub fn <a href='#method.text_contents' class='fnname'>text_contents</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#277-283' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return the concatenation of all text nodes in this subtree.</p>
|
||
</div></div><h3 id='impl-4' class='impl'><code class='in-band'>impl <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-4' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#402-489' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.append' class="method"><code>pub fn <a href='#method.append' class='fnname'>append</a>(&self, new_child: <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>)</code><a class='srclink' href='../src/kuchiki/tree.rs.html#406-419' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append a new child to this node, after existing children.</p>
|
||
<p>The new child is detached from its previous position.</p>
|
||
</div><h4 id='method.prepend' class="method"><code>pub fn <a href='#method.prepend' class='fnname'>prepend</a>(&self, new_child: <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>)</code><a class='srclink' href='../src/kuchiki/tree.rs.html#424-438' title='goto source code'>[src]</a></h4><div class='docblock'><p>Prepend a new child to this node, before existing children.</p>
|
||
<p>The new child is detached from its previous position.</p>
|
||
</div><h4 id='method.insert_after' class="method"><code>pub fn <a href='#method.insert_after' class='fnname'>insert_after</a>(&self, new_sibling: <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>)</code><a class='srclink' href='../src/kuchiki/tree.rs.html#443-462' title='goto source code'>[src]</a></h4><div class='docblock'><p>Insert a new sibling after this node.</p>
|
||
<p>The new sibling is detached from its previous position.</p>
|
||
</div><h4 id='method.insert_before' class="method"><code>pub fn <a href='#method.insert_before' class='fnname'>insert_before</a>(&self, new_sibling: <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>)</code><a class='srclink' href='../src/kuchiki/tree.rs.html#467-488' title='goto source code'>[src]</a></h4><div class='docblock'><p>Insert a new sibling before this node.</p>
|
||
<p>The new sibling is detached from its previous position.</p>
|
||
</div></div><h2 id='deref-methods' class='small-section-header'>Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="../kuchiki/struct.Node.html" title="struct kuchiki::Node">Node</a>><a href='#deref-methods' class='anchor'></a></h2><div class='impl-items'><h4 id='method.data' class="method"><code>pub fn <a href='#method.data' class='fnname'>data</a>(&self) -> &<a class="enum" href="../kuchiki/enum.NodeData.html" title="enum kuchiki::NodeData">NodeData</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#289-291' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to this node’s node-type-specific data.</p>
|
||
</div><h4 id='method.as_element' class="method"><code>pub fn <a href='#method.as_element' class='fnname'>as_element</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../kuchiki/struct.ElementData.html" title="struct kuchiki::ElementData">ElementData</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#295-300' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is an element, return a reference to element-specific data.</p>
|
||
</div><h4 id='method.as_text' class="method"><code>pub fn <a href='#method.as_text' class='fnname'>as_text</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#304-309' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a text node, return a reference to its contents.</p>
|
||
</div><h4 id='method.as_comment' class="method"><code>pub fn <a href='#method.as_comment' class='fnname'>as_comment</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#313-318' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a comment, return a reference to its contents.</p>
|
||
</div><h4 id='method.as_doctype' class="method"><code>pub fn <a href='#method.as_doctype' class='fnname'>as_doctype</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../kuchiki/struct.Doctype.html" title="struct kuchiki::Doctype">Doctype</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#322-327' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a document, return a reference to doctype-specific data.</p>
|
||
</div><h4 id='method.as_document' class="method"><code>pub fn <a href='#method.as_document' class='fnname'>as_document</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../kuchiki/struct.DocumentData.html" title="struct kuchiki::DocumentData">DocumentData</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#331-336' title='goto source code'>[src]</a></h4><div class='docblock'><p>If this node is a document, return a reference to document-specific data.</p>
|
||
</div><h4 id='method.parent' class="method"><code>pub fn <a href='#method.parent' class='fnname'>parent</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#340-342' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the parent node, unless this node is the root of the tree.</p>
|
||
</div><h4 id='method.first_child' class="method"><code>pub fn <a href='#method.first_child' class='fnname'>first_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#346-348' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the first child of this node, unless it has no child.</p>
|
||
</div><h4 id='method.last_child' class="method"><code>pub fn <a href='#method.last_child' class='fnname'>last_child</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#352-354' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the last child of this node, unless it has no child.</p>
|
||
</div><h4 id='method.previous_sibling' class="method"><code>pub fn <a href='#method.previous_sibling' class='fnname'>previous_sibling</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#358-360' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the previous sibling of this node, unless it is a first child.</p>
|
||
</div><h4 id='method.next_sibling' class="method"><code>pub fn <a href='#method.next_sibling' class='fnname'>next_sibling</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>></code><a class='srclink' href='../src/kuchiki/tree.rs.html#364-366' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the previous sibling of this node, unless it is a last child.</p>
|
||
</div><h4 id='method.detach' class="method"><code>pub fn <a href='#method.detach' class='fnname'>detach</a>(&self)</code><a class='srclink' href='../src/kuchiki/tree.rs.html#371-399' title='goto source code'>[src]</a></h4><div class='docblock'><p>Detach a node from its parent and siblings. Children are not affected.</p>
|
||
<p>To remove a node and its descendants, detach it and drop any strong reference to it.</p>
|
||
</div></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#95' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#95' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#95' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#95' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-Deref' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Deref' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#98-104' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Target' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = <a class="struct" href="../kuchiki/struct.Node.html" title="struct kuchiki::Node">Node</a></code></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
|
||
</div><h4 id='method.deref' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&self) -> &<a class="struct" href="../kuchiki/struct.Node.html" title="struct kuchiki::Node">Node</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#101-103' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Dereferences the value.</p>
|
||
</div></div><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#106' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-PartialEq%3CNodeRef%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-PartialEq%3CNodeRef%3E' class='anchor'></a><a class='srclink' href='../src/kuchiki/tree.rs.html#107-114' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/kuchiki/tree.rs.html#109-113' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||
</div><h4 id='method.ne' class="method hidden"><code><span class="docblock attributes">#[must_use]</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#215-217' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||
</div></div><h3 id='impl-Serialize' class='impl'><code class='in-band'>impl Serialize for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Serialize' class='anchor'></a><a class='srclink' href='../src/kuchiki/serializer.rs.html#11-74' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.serialize-1' class="method hidden"><code>fn <a href='#method.serialize' class='fnname'>serialize</a><S: Serializer>(<br> &self, <br> serializer: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>S, <br> traversal_scope: TraversalScope<br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../src/kuchiki/serializer.rs.html#12-73' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Take the serializer and call its methods to serialize this type. The type will dictate which methods are called and with what parameters. <a href="#tymethod.serialize">Read more</a></p>
|
||
</div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='../src/kuchiki/serializer.rs.html#76-83' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='../src/kuchiki/serializer.rs.html#78-82' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
|
||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../kuchiki/struct.NodeRef.html" title="struct kuchiki::NodeRef">NodeRef</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#566-570' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-569' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#555-562' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||
</div><h4 id='method.to_owned' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
</div><h4 id='method.clone_into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||
</div></div><h3 id='impl-ToString-1' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString-1' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2237-2247' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string-1' class="method hidden"><code>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2239-2246' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
|
||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#603-612' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#609-611' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "kuchiki";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |