difftastic/rustdoc/petgraph/csr/struct.Csr.html

154 lines
80 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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="Compressed Sparse Row (`CSR`) is a sparse adjacency matrix graph."><title>Csr in petgraph::csr - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="petgraph" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../petgraph/index.html">petgraph</a><span class="version">0.6.4</span></h2></div><h2 class="location"><a href="#">Csr</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_edge">add_edge</a></li><li><a href="#method.add_node">add_node</a></li><li><a href="#method.clear_edges">clear_edges</a></li><li><a href="#method.contains_edge">contains_edge</a></li><li><a href="#method.edge_count">edge_count</a></li><li><a href="#method.edges">edges</a></li><li><a href="#method.edges_slice">edges_slice</a></li><li><a href="#method.from_sorted_edges">from_sorted_edges</a></li><li><a href="#method.is_directed">is_directed</a></li><li><a href="#method.neighbors_slice">neighbors_slice</a></li><li><a href="#method.new">new</a></li><li><a href="#method.node_count">node_count</a></li><li><a href="#method.out_degree">out_degree</a></li><li><a href="#method.with_nodes">with_nodes</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Csr%3CN,+E,+Ty,+Ix%3E">Clone</a></li><li><a href="#impl-Data-for-Csr%3CN,+E,+Ty,+Ix%3E">Data</a></li><li><a href="#impl-Debug-for-Csr%3CN,+E,+Ty,+Ix%3E">Debug</a></li><li><a href="#impl-Default-for-Csr%3CN,+E,+Ty,+Ix%3E">Default</a></li><li><a href="#impl-EdgeCount-for-Csr%3CN,+E,+Ty,+Ix%3E">EdgeCount</a></li><li><a href="#impl-GetAdjacencyMatrix-for-%26Csr%3CN,+E,+Ty,+Ix%3E">GetAdjacencyMatrix</a></li><li><a href="#impl-GraphBase-for-Csr%3CN,+E,+Ty,+Ix%3E">GraphBase</a></li><li><a href="#impl-GraphProp-for-Csr%3CN,+E,+Ty,+Ix%3E">GraphProp</a></li><li><a href="#impl-Index%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E">Index&lt;Ix&gt;</a></li><li><a href="#impl-IndexMut%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E">IndexMut&lt;Ix&gt;</a></li><li><a href="#impl-IntoEdgeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E">IntoEdgeReferences</a></li><li><a href="#impl-IntoEdges-for-%26Csr%3CN,+E,+Ty,+Ix%3E">IntoEdges</a></li><li><a href="#impl-IntoNeighbors-for-%26Csr%3CN,+E,+Ty,+Ix%3E">IntoNeighbors</a></li><li><a href="#impl-IntoNodeIdentifiers-for-%26Csr%3CN,+E,+Ty,+Ix%3E">IntoNodeIdentifiers</a></li><li><a href="#impl-IntoNodeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E">IntoNodeReferences</a></li><li><a href="#impl-NodeCompactIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E">NodeCompactIndexable</a></li><li><a href="#impl-NodeCount-for-Csr%3CN,+E,+Ty,+Ix%3E">NodeCount</a></li><li><a href="#impl-NodeIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E">NodeIndexable</a></li><li><a href="#impl-Visitable-for-Csr%3CN,+E,+Ty,+Ix%3E">Visitable</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Csr%3CN,+E,+Ty,+Ix%3E">Send</a></li><li><a href="#impl-Sync-for-Csr%3CN,+E,+Ty,+Ix%3E">Sync</a></li><li><a href="#impl-Unpin-for-Csr%3CN,+E,+Ty,+Ix%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E">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">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In petgraph::csr</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../petgraph/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">petgraph</a>::<wbr><a href="index.html">csr</a>::<wbr><a class="struct" href="#">Csr</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/petgraph/csr.rs.html#47-58">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Csr&lt;N = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, E = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, Ty = <a class="enum" href="../enum.Directed.html" title="enum petgraph::Directed">Directed</a>, Ix = <a class="type" href="../graph/type.DefaultIx.html" title="type petgraph::graph::DefaultIx">DefaultIx</a>&gt; { <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>Compressed Sparse Row (<a href="https://en.wikipedia.org/wiki/Sparse_matrix#Compressed_sparse_row_(CSR,_CRS_or_Yale_format)"><code>CSR</code></a>) is a sparse adjacency matrix graph.</p>
<p><code>CSR</code> is parameterized over:</p>
<ul>
<li>Associated data <code>N</code> for nodes and <code>E</code> for edges, called <em>weights</em>.
The associated data can be of arbitrary type.</li>
<li>Edge type <code>Ty</code> that determines whether the graph edges are directed or undirected.</li>
<li>Index type <code>Ix</code>, which determines the maximum size of the graph.</li>
</ul>
<p>Using <strong>O(|E| + |V|)</strong> space.</p>
<p>Self loops are allowed, no parallel edges.</p>
<p>Fast iteration of the outgoing edges of a vertex.</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-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#83-129">source</a><a href="#impl-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#89-98">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Create an empty <code>Csr</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_nodes" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#116-128">source</a><h4 class="code-header">pub fn <a href="#method.with_nodes" class="fn">with_nodes</a>(n: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -&gt; Self<div class="where">where
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</div></h4></section></summary><div class="docblock"><p>Create a new <code>Csr</code> with <code>n</code> nodes. <code>N</code> must implement <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html"><code>Default</code></a> for the weight of each node.</p>
<h5 id="example"><a href="#example">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>petgraph::csr::Csr;
<span class="kw">use </span>petgraph::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>graph = Csr::&lt;u8,()&gt;::with_nodes(<span class="number">5</span>);
<span class="macro">assert_eq!</span>(graph.node_count(),<span class="number">5</span>);
<span class="macro">assert_eq!</span>(graph.edge_count(),<span class="number">0</span>);
<span class="macro">assert_eq!</span>(graph[<span class="number">0</span>],<span class="number">0</span>);
<span class="macro">assert_eq!</span>(graph[<span class="number">4</span>],<span class="number">0</span>);</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Csr%3CN,+E,+Directed,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#137-232">source</a><a href="#impl-Csr%3CN,+E,+Directed,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ix&gt; <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, <a class="enum" href="../enum.Directed.html" title="enum petgraph::Directed">Directed</a>, Ix&gt;<div class="where">where
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_sorted_edges" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#159-231">source</a><h4 class="code-header">pub fn <a href="#method.from_sorted_edges" class="fn">from_sorted_edges</a>&lt;Edge&gt;(edges: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[Edge]</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="struct" href="struct.EdgesNotSorted.html" title="struct petgraph::csr::EdgesNotSorted">EdgesNotSorted</a>&gt;<div class="where">where
Edge: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a>&lt;E, NodeId = <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;&gt;,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</div></h4></section></summary><div class="docblock"><p>Create a new <code>Csr</code> from a sorted sequence of edges</p>
<p>Edges <strong>must</strong> be sorted and unique, where the sort order is the default
order for the pair <em>(u, v)</em> in Rust (<em>u</em> has priority).</p>
<p>Computes in <strong>O(|E| + |V|)</strong> time.</p>
<h5 id="example-1"><a href="#example-1">Example</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>petgraph::csr::Csr;
<span class="kw">use </span>petgraph::prelude::<span class="kw-2">*</span>;
<span class="kw">let </span>graph = Csr::&lt;(),()&gt;::from_sorted_edges(<span class="kw-2">&amp;</span>[
(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">0</span>, <span class="number">2</span>),
(<span class="number">1</span>, <span class="number">0</span>), (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">1</span>, <span class="number">3</span>),
(<span class="number">2</span>, <span class="number">0</span>),
(<span class="number">3</span>, <span class="number">1</span>),
]);</code></pre></div>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Csr%3CN,+E,+Ty,+Ix%3E-1" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#234-394">source</a><a href="#impl-Csr%3CN,+E,+Ty,+Ix%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.node_count" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#239-241">source</a><h4 class="code-header">pub fn <a href="#method.node_count" class="fn">node_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section><section id="method.edge_count" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#243-249">source</a><h4 class="code-header">pub fn <a href="#method.edge_count" class="fn">edge_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section><section id="method.is_directed" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#251-253">source</a><h4 class="code-header">pub fn <a href="#method.is_directed" class="fn">is_directed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.clear_edges" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#256-265">source</a><h4 class="code-header">pub fn <a href="#method.clear_edges" class="fn">clear_edges</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Remove all edges</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_node" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#268-273">source</a><h4 class="code-header">pub fn <a href="#method.add_node" class="fn">add_node</a>(&amp;mut self, weight: N) -&gt; <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;</h4></section></summary><div class="docblock"><p>Adds a new node with the given weight, returning the corresponding node index.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_edge" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#281-294">source</a><h4 class="code-header">pub fn <a href="#method.add_edge" class="fn">add_edge</a>(
&amp;mut self,
a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;,
b: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;,
weight: E
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a><div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Return <code>true</code> if the edge was added</p>
<p>If you add all edges in row-major order, the time complexity
is <strong>O(|V|·|E|)</strong> for the whole operation.</p>
<p><strong>Panics</strong> if <code>a</code> or <code>b</code> are out of bounds.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains_edge" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#337-339">source</a><h4 class="code-header">pub fn <a href="#method.contains_edge" class="fn">contains_edge</a>(&amp;self, a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;, b: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Computes in <strong>O(log |V|)</strong> time.</p>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.out_degree" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#359-362">source</a><h4 class="code-header">pub fn <a href="#method.out_degree" class="fn">out_degree</a>(&amp;self, a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Computes in <strong>O(1)</strong> time.</p>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.neighbors_slice" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#367-369">source</a><h4 class="code-header">pub fn <a href="#method.neighbors_slice" class="fn">neighbors_slice</a>(&amp;self, a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; &amp;[<a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;]</h4></section></summary><div class="docblock"><p>Computes in <strong>O(1)</strong> time.</p>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.edges_slice" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#374-376">source</a><h4 class="code-header">pub fn <a href="#method.edges_slice" class="fn">edges_slice</a>(&amp;self, a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.slice.html">[E]</a></h4></section></summary><div class="docblock"><p>Computes in <strong>O(1)</strong> time.</p>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.edges" class="method"><a class="src rightside" href="../../src/petgraph/csr.rs.html#385-393">source</a><h4 class="code-header">pub fn <a href="#method.edges" class="fn">edges</a>(&amp;self, a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; <a class="struct" href="struct.Edges.html" title="struct petgraph::csr::Edges">Edges</a>&lt;'_, E, Ty, Ix&gt; <a href="#" class="tooltip" data-notable-ty="Edges&lt;&#39;_, E, Ty, Ix&gt;"></a></h4></section></summary><div class="docblock"><p>Return an iterator of all edges of <code>a</code>.</p>
<ul>
<li><code>Directed</code>: Outgoing edges from <code>a</code>.</li>
<li><code>Undirected</code>: All edges connected to <code>a</code>.</li>
</ul>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.<br>
Iterator element type is <code>EdgeReference&lt;E, Ty, Ix&gt;</code>.</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-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#70-81">source</a><a href="#impl-Clone-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, Ty, Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;</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/petgraph/csr.rs.html#71-80">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; Self</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.76.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.76.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.76.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-Data-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#481-488">source</a><a href="#impl-Data-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.Data.html" title="trait petgraph::visit::Data">Data</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeWeight" class="associatedtype trait-impl"><a href="#associatedtype.NodeWeight" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Data.html#associatedtype.NodeWeight" class="associatedtype">NodeWeight</a> = N</h4></section><section id="associatedtype.EdgeWeight" class="associatedtype trait-impl"><a href="#associatedtype.EdgeWeight" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Data.html#associatedtype.EdgeWeight" class="associatedtype">EdgeWeight</a> = E</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#46">source</a><a href="#impl-Debug-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;</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/petgraph/csr.rs.html#46">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.76.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.76.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-Default-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#60-68">source</a><a href="#impl-Default-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#65-67">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EdgeCount-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#722-731">source</a><a href="#impl-EdgeCount-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.EdgeCount.html" title="trait petgraph::visit::EdgeCount">EdgeCount</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.edge_count-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#728-730">source</a><a href="#method.edge_count-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.EdgeCount.html#tymethod.edge_count" class="fn">edge_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Return the number of edges in the graph.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GetAdjacencyMatrix-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#793-818">source</a><a href="#impl-GetAdjacencyMatrix-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.GetAdjacencyMatrix.html" title="trait petgraph::visit::GetAdjacencyMatrix">GetAdjacencyMatrix</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,</div></h3></section></summary><div class="docblock"><p>The adjacency matrix for <strong>Csr</strong> is a bitmap thats computed by
<code>.adjacency_matrix()</code>.</p>
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.AdjMatrix" class="associatedtype trait-impl"><a href="#associatedtype.AdjMatrix" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GetAdjacencyMatrix.html#associatedtype.AdjMatrix" class="associatedtype">AdjMatrix</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>The associated adjacency matrix type</div></details><details class="toggle method-toggle" open><summary><section id="method.adjacency_matrix" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#800-811">source</a><a href="#method.adjacency_matrix" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.adjacency_matrix" class="fn">adjacency_matrix</a>(&amp;self) -&gt; <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>Create the adjacency matrix</div></details><details class="toggle method-toggle" open><summary><section id="method.is_adjacent" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#813-817">source</a><a href="#method.is_adjacent" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent" class="fn">is_adjacent</a>(
&amp;self,
matrix: &amp;<a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a>,
a: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;,
b: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Return true if there is an edge from <code>a</code> to <code>b</code>, false otherwise. <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GraphBase-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#563-570">source</a><a href="#impl-GraphBase-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.GraphBase.html" title="trait petgraph::visit::GraphBase">GraphBase</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.NodeId" class="associatedtype trait-impl"><a href="#associatedtype.NodeId" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphBase.html#associatedtype.NodeId" class="associatedtype">NodeId</a> = Ix</h4></section></summary><div class='docblock'>node identifier</div></details><details class="toggle" open><summary><section id="associatedtype.EdgeId" class="associatedtype trait-impl"><a href="#associatedtype.EdgeId" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphBase.html#associatedtype.EdgeId" class="associatedtype">EdgeId</a> = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>edge identifier</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GraphProp-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#733-739">source</a><a href="#impl-GraphProp-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.GraphProp.html" title="trait petgraph::visit::GraphProp">GraphProp</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.EdgeType" class="associatedtype trait-impl"><a href="#associatedtype.EdgeType" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphProp.html#associatedtype.EdgeType" class="associatedtype">EdgeType</a> = Ty</h4></section></summary><div class='docblock'>The kind of edges in the graph.</div></details><section id="method.is_directed-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/visit/mod.rs.html#329-331">source</a><a href="#method.is_directed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GraphProp.html#method.is_directed" class="fn">is_directed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#655-665">source</a><a href="#impl-Index%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;Ix&gt; for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = N</h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#662-664">source</a><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&amp;self, ix: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;N</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#667-675">source</a><a href="#impl-IndexMut%3CIx%3E-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;Ix&gt; for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#672-674">source</a><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&amp;mut self, ix: <a class="type" href="type.NodeIndex.html" title="type petgraph::csr::NodeIndex">NodeIndex</a>&lt;Ix&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;mut N</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoEdgeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#490-508">source</a><a href="#impl-IntoEdgeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.IntoEdgeReferences.html" title="trait petgraph::visit::IntoEdgeReferences">IntoEdgeReferences</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.EdgeRef" class="associatedtype trait-impl"><a href="#associatedtype.EdgeRef" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeRef" class="associatedtype">EdgeRef</a> = <a class="struct" href="struct.EdgeReference.html" title="struct petgraph::csr::EdgeReference">EdgeReference</a>&lt;'a, E, Ty, Ix&gt;</h4></section><section id="associatedtype.EdgeReferences" class="associatedtype trait-impl"><a href="#associatedtype.EdgeReferences" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" class="associatedtype">EdgeReferences</a> = <a class="struct" href="struct.EdgeReferences.html" title="struct petgraph::csr::EdgeReferences">EdgeReferences</a>&lt;'a, E, Ty, Ix&gt;</h4></section><section id="method.edge_references" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#497-507">source</a><a href="#method.edge_references" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoEdgeReferences.html#tymethod.edge_references" class="fn">edge_references</a>(self) -&gt; Self::<a class="associatedtype" href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" title="type petgraph::visit::IntoEdgeReferences::EdgeReferences">EdgeReferences</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoEdges-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#552-561">source</a><a href="#impl-IntoEdges-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.IntoEdges.html" title="trait petgraph::visit::IntoEdges">IntoEdges</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Edges" class="associatedtype trait-impl"><a href="#associatedtype.Edges" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdges.html#associatedtype.Edges" class="associatedtype">Edges</a> = <a class="struct" href="struct.Edges.html" title="struct petgraph::csr::Edges">Edges</a>&lt;'a, E, Ty, Ix&gt;</h4></section><section id="method.edges-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#558-560">source</a><a href="#method.edges-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoEdges.html#tymethod.edges" class="fn">edges</a>(self, a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; Self::<a class="associatedtype" href="../visit/trait.IntoEdges.html#associatedtype.Edges" title="type petgraph::visit::IntoEdges::Edges">Edges</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNeighbors-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#611-630">source</a><a href="#impl-IntoNeighbors-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.IntoNeighbors.html" title="trait petgraph::visit::IntoNeighbors">IntoNeighbors</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.neighbors" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#625-629">source</a><a href="#method.neighbors" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNeighbors.html#tymethod.neighbors" class="fn">neighbors</a>(self, a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; Self::<a class="associatedtype" href="../visit/trait.IntoNeighbors.html#associatedtype.Neighbors" title="type petgraph::visit::IntoNeighbors::Neighbors">Neighbors</a></h4></section></summary><div class="docblock"><p>Return an iterator of all neighbors of <code>a</code>.</p>
<ul>
<li><code>Directed</code>: Targets of outgoing edges from <code>a</code>.</li>
<li><code>Undirected</code>: Opposing endpoints of all edges connected to <code>a</code>.</li>
</ul>
<p><strong>Panics</strong> if the node <code>a</code> does not exist.<br>
Iterator element type is <code>NodeIndex&lt;Ix&gt;</code>.</p>
</div></details><section id="associatedtype.Neighbors" class="associatedtype trait-impl"><a href="#associatedtype.Neighbors" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNeighbors.html#associatedtype.Neighbors" class="associatedtype">Neighbors</a> = <a class="struct" href="struct.Neighbors.html" title="struct petgraph::csr::Neighbors">Neighbors</a>&lt;'a, Ix&gt;</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNodeIdentifiers-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#698-710">source</a><a href="#impl-IntoNodeIdentifiers-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.IntoNodeIdentifiers.html" title="trait petgraph::visit::IntoNodeIdentifiers">IntoNodeIdentifiers</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeIdentifiers" class="associatedtype trait-impl"><a href="#associatedtype.NodeIdentifiers" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" class="associatedtype">NodeIdentifiers</a> = <a class="struct" href="struct.NodeIdentifiers.html" title="struct petgraph::csr::NodeIdentifiers">NodeIdentifiers</a>&lt;Ix&gt;</h4></section><section id="method.node_identifiers" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#704-709">source</a><a href="#method.node_identifiers" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNodeIdentifiers.html#tymethod.node_identifiers" class="fn">node_identifiers</a>(self) -&gt; Self::<a class="associatedtype" href="../visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" title="type petgraph::visit::IntoNodeIdentifiers::NodeIdentifiers">NodeIdentifiers</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNodeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#741-754">source</a><a href="#impl-IntoNodeReferences-for-%26Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a, N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.IntoNodeReferences.html" title="trait petgraph::visit::IntoNodeReferences">IntoNodeReferences</a> for &amp;'a <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeRef" class="associatedtype trait-impl"><a href="#associatedtype.NodeRef" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeRef" class="associatedtype">NodeRef</a> = (Ix, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;'a N</a>)</h4></section><section id="associatedtype.NodeReferences" class="associatedtype trait-impl"><a href="#associatedtype.NodeReferences" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" class="associatedtype">NodeReferences</a> = <a class="struct" href="struct.NodeReferences.html" title="struct petgraph::csr::NodeReferences">NodeReferences</a>&lt;'a, N, Ix&gt;</h4></section><section id="method.node_references" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#748-753">source</a><a href="#method.node_references" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNodeReferences.html#tymethod.node_references" class="fn">node_references</a>(self) -&gt; Self::<a class="associatedtype" href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" title="type petgraph::visit::IntoNodeReferences::NodeReferences">NodeReferences</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeCount-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#712-720">source</a><a href="#impl-NodeCount-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.NodeCount.html" title="trait petgraph::visit::NodeCount">NodeCount</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.node_count-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#717-719">source</a><a href="#method.node_count-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeCount.html#tymethod.node_count" class="fn">node_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#632-646">source</a><a href="#impl-NodeIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.NodeIndexable.html" title="trait petgraph::visit::NodeIndexable">NodeIndexable</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.node_bound" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#637-639">source</a><a href="#method.node_bound" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.node_bound" class="fn">node_bound</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Return an upper bound of the node indices in the graph
(suitable for the size of a bitmap).</div></details><details class="toggle method-toggle" open><summary><section id="method.to_index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#640-642">source</a><a href="#method.to_index" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.to_index" class="fn">to_index</a>(&amp;self, a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Convert <code>a</code> to an integer index.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#643-645">source</a><a href="#method.from_index" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.from_index" class="fn">from_index</a>(&amp;self, ix: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -&gt; Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></h4></section></summary><div class='docblock'>Convert <code>i</code> to a node index. <code>i</code> must be a valid value in the graph.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Visitable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#574-587">source</a><a href="#impl-Visitable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.Visitable.html" title="trait petgraph::visit::Visitable">Visitable</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Map" class="associatedtype trait-impl"><a href="#associatedtype.Map" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Visitable.html#associatedtype.Map" class="associatedtype">Map</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>The associated map type</div></details><details class="toggle method-toggle" open><summary><section id="method.visit_map" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#580-582">source</a><a href="#method.visit_map" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.Visitable.html#tymethod.visit_map" class="fn">visit_map</a>(&amp;self) -&gt; <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>Create a new visitor map</div></details><details class="toggle method-toggle" open><summary><section id="method.reset_map" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#583-586">source</a><a href="#method.reset_map" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.Visitable.html#tymethod.reset_map" class="fn">reset_map</a>(&amp;self, map: &amp;mut Self::<a class="associatedtype" href="../visit/trait.Visitable.html#associatedtype.Map" title="type petgraph::visit::Visitable::Map">Map</a>)</h4></section></summary><div class='docblock'>Reset the visitor map (and resize to new size of graph if needed)</div></details></div></details><section id="impl-NodeCompactIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/csr.rs.html#648-653">source</a><a href="#impl-NodeCompactIndexable-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="../visit/trait.NodeCompactIndexable.html" title="trait petgraph::visit::NodeCompactIndexable">NodeCompactIndexable</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></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-RefUnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Send-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Sync-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-Unpin-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Unpin-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-UnwindSafe-for-Csr%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl&lt;N, E, Ty, Ix&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Csr.html" title="struct petgraph::csr::Csr">Csr</a>&lt;N, E, Ty, Ix&gt;<div class="where">where
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></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.76.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.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.76.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.76.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.76.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.76.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.76.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.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.76.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.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.76.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.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.76.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.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-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; 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.76.0/src/core/convert/mod.rs.html#766">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; 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.76.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</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.76.0/src/core/convert/mod.rs.html#756">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; 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.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; 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.76.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.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.76.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 href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.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.76.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.76.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.76.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;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.76.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.76.0/src/core/convert/mod.rs.html#803-805">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.76.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.76.0/src/core/convert/mod.rs.html#810">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</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.76.0/src/core/convert/mod.rs.html#788-790">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.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.76.0/src/core/convert/mod.rs.html#795">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Edges<'_, E, Ty, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Edges.html\" title=\"struct petgraph::csr::Edges\">Edges</a>&lt;'a, E, Ty, Ix&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a, E, Ty, Ix&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Edges.html\" title=\"struct petgraph::csr::Edges\">Edges</a>&lt;'a, E, Ty, Ix&gt;<div class=\"where\">where\n Ty: <a class=\"trait\" href=\"../trait.EdgeType.html\" title=\"trait petgraph::EdgeType\">EdgeType</a>,\n Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.EdgeReference.html\" title=\"struct petgraph::csr::EdgeReference\">EdgeReference</a>&lt;'a, E, Ty, Ix&gt;;</div>"}</script></section></div></main></body></html>