<!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 `Diff` enum in crate `itertools`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Diff">
<title>itertools::Diff - Rust</title>
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body class="rustdoc">
<nav class="sidebar">
<p class='location'><a href='index.html'>itertools</a></p><script>window.sidebarCurrent = {name: 'Diff', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content enum">
<h1 class='fqn'><span class='in-band'>Enum <a href='index.html'>itertools</a>::<wbr><a class='enum' href=''>Diff</a></span><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 id='src-1176' class='srclink' href='../src/itertools/diff.rs.html#14-25' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum Diff<I, J> <span class='where'>where I: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a>, J: <a class='trait' href='https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html' title='core::iter::Iterator'>Iterator</a></span> {
FirstMismatch(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='../itertools/struct.PutBack.html' title='itertools::PutBack'>PutBack</a><I>, <a class='struct' href='../itertools/struct.PutBack.html' title='itertools::PutBack'>PutBack</a><J>),
Shorter(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='../itertools/struct.PutBack.html' title='itertools::PutBack'>PutBack</a><I>),
Longer(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a>, <a class='struct' href='../itertools/struct.PutBack.html' title='itertools::PutBack'>PutBack</a><J>),
}</pre><div class='docblock'><p>A type returned by the <a href="./fn.diff_with.html"><code>diff_with</code></a> function.</p>
<p><code>Diff</code> represents the way in which the elements yielded by the iterator <code>I</code> differ to some
iterator <code>J</code>.</p>
</div><h2 class='variants'>Variants</h2>
<table><tr><td id='variant.FirstMismatch'><code>FirstMismatch</code></td><td><div class='docblock'><p>The index of the first non-matching element along with both iterator's remaining elements
starting with the first mis-match.</p>
</div></td></tr><tr><td id='variant.Shorter'><code>Shorter</code></td><td><div class='docblock'><p>The total number of elements that were in <code>J</code> along with the remaining elements of <code>I</code>.</p>
</div></td></tr><tr><td id='variant.Longer'><code>Longer</code></td><td><div class='docblock'><p>The total number of elements that were in <code>I</code> along with the remaining elements of <code>J</code>.</p>
</div></td></tr></table></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "itertools";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>