<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Value that either holds a single A or B, or both."><title>EitherOrBoth in itertools - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="itertools"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.1 (7cf61ebde 2024-03-27)"data-channel="1.77.1"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../itertools/index.html">itertools</a><spanclass="version">0.12.1</span></h2></div><h2class="location"><ahref="#">EitherOrBoth</a></h2><divclass="sidebar-elems"><section><h3><ahref="#variants">Variants</a></h3><ulclass="block variant"><li><ahref="#variant.Both">Both</a></li><li><ahref="#variant.Left">Left</a></li><li><ahref="#variant.Right">Right</a></li></ul><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.as_deref">as_deref</a></li><li><ahref="#method.as_deref_mut">as_deref_mut</a></li><li><ahref="#method.as_mut">as_mut</a></li><li><ahref="#method.as_ref">as_ref</a></li><li><ahref="#method.both">both</a></li><li><ahref="#method.flip">flip</a></li><li><ahref="#method.has_left">has_left</a></li><li><ahref="#method.has_right">has_right</a></li><li><ahref="#method.insert_both">insert_both</a></li><li><ahref="#method.insert_left">insert_left</a></li><li><ahref="#method.insert_right">insert_right</a></li><li><ahref="#method.into_left">into_left</a></li><li><ahref="#method.into_right">into_right</a></li><li><ahref="#method.is_both">is_both</a></li><li><ahref="#method.is_left">is_left</a></li><li><ahref="#method.is_right">is_right</a></li><li><ahref="#method.just_left">just_left</a></li><li><ahref="#method.just_right">just_right</a></li><li><ahref="#method.left">left</a></li><li><ahref="#method.left_and_right">left_and_right</a></li><li><ahref="#method.left_and_then">left_and_then</a></li><li><ahref="#method.left_or_insert">left_or_insert</a></li><li><ahref="#method.left_or_insert_with">left_or_insert_with</a></li><li><ahref="#method.map_any">map_any</a></li><li><ahref="#method.map_left">map_left</a></li><li><ahref="#method.map_right">map_right</a></li><li><ahref="#method.
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../itertools/all.html"title="show sidebar"></a></div><inputclass="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"><divid="help-button"tabindex="-1"><ahref="../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Enum <ahref="index.html">itertools</a>::<wbr><aclass="enum"href="#">EitherOrBoth</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../src/itertools/either_or_both.rs.html#9-16">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub enum EitherOrBoth<A, B = A> {
Both(A, B),
Left(A),
Right(B),
}</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Value that either holds a single A or B, or both.</p>
</div></details><h2id="variants"class="variants section-header">Variants<ahref="#variants"class="anchor">§</a></h2><divclass="variants"><sectionid="variant.Both"class="variant"><ahref="#variant.Both"class="anchor">§</a><h3class="code-header">Both(A, B)</h3></section><divclass="docblock"><p>Both values are present.</p>
</div><sectionid="variant.Left"class="variant"><ahref="#variant.Left"class="anchor">§</a><h3class="code-header">Left(A)</h3></section><divclass="docblock"><p>Only the left value of type <code>A</code> is present.</p>
</div><sectionid="variant.Right"class="variant"><ahref="#variant.Right"class="anchor">§</a><h3class="code-header">Right(B)</h3></section><divclass="docblock"><p>Only the right value of type <code>B</code> is present.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.left"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#47-52">source</a><h4class="code-header">pub fn <ahref="#method.left"class="fn">left</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><A></h4></section></summary><divclass="docblock"><p>If <code>Left</code>, or <code>Both</code>, return <code>Some</code> with the left value. Otherwise, return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.right"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#55-60">source</a><h4class="code-header">pub fn <ahref="#method.right"class="fn">right</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><B></h4></section></summary><divclass="docblock"><p>If <code>Right</code>, or <code>Both</code>, return <code>Some</code> with the right value. Otherwise, return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.left_and_right"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#66-68">source</a><h4class="code-header">pub fn <ahref="#method.left_and_right"class="fn">left_and_right</a>(self) -> (<aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><A>, <aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><B>)</h4></section></summary><divclass="docblock"><p>Return tuple of options corresponding to the left and right value respectively</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.just_left"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#88-93">source</a><h4class="code-header">pub fn <ahref="#method.just_left"class="fn">just_left</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><A></h4></section></summary><divclass="docblock"><p>If <code>Left</code>, return <code>Some</code> with the left value. If <code>Right</code> or <code>Both</code>, return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.just_right"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#113-118">source</a><h4class="code-header">pub fn <ahref="#method.just_right"class="fn">just_right</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><B></h4></section></summary><divclass="docblock"><p>If <code>Right</code>, return <code>Some</code> with the right value. If <code>Left</code> or <code>Both</code>, return <code>None</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.both"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#121-126">source</a><h4class="code-header">pub fn <ahref="#method.both"class="fn">both</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.tuple.html">(A, B)</a>></h4></section></summary><divclass="docblock"><p>If <code>Both</code>, return <code>Some</code> containing the left and right values. Otherwise, return <code>None</code>.</p>
B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><A>,</div></h4></section></summary><divclass="docblock"><p>If <code>Left</code> or <code>Both</code>, return the left value. Otherwise, convert the right value and return it.</p>
A: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><B>,</div></h4></section></summary><divclass="docblock"><p>If <code>Right</code> or <code>Both</code>, return the right value. Otherwise, convert the left value and return it.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_ref"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#151-157">source</a><h4class="code-header">pub fn <ahref="#method.as_ref"class="fn">as_ref</a>(&self) -><aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&A</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&B</a>></h4></section></summary><divclass="docblock"><p>Converts from <code>&EitherOrBoth<A, B></code> to <code>EitherOrBoth<&A, &B></code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#160-166">source</a><h4class="code-header">pub fn <ahref="#method.as_mut"class="fn">as_mut</a>(&mut self) -><aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut A</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut B</a>></h4></section></summary><divclass="docblock"><p>Converts from <code>&mut EitherOrBoth<A, B></code> to <code>EitherOrBoth<&mut A, &mut B></code>.</p>
B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a>,</div></h4></section></summary><divclass="docblock"><p>Converts from <code>&EitherOrBoth<A, B></code> to <code>EitherOrBoth<&_, &_></code> using the <ahref="https://doc.rust-lang.org/1.77.1/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref"><code>Deref</code></a> trait.</p>
B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/deref/trait.DerefMut.html"title="trait core::ops::deref::DerefMut">DerefMut</a>,</div></h4></section></summary><divclass="docblock"><p>Converts from <code>&mut EitherOrBoth<A, B></code> to <code>EitherOrBoth<&mut _, &mut _></code> using the <ahref="https://doc.rust-lang.org/1.77.1/core/ops/deref/trait.DerefMut.html"title="trait core::ops::deref::DerefMut"><code>DerefMut</code></a> trait.</p>
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(A) -> M,</div></h4></section></summary><divclass="docblock"><p>Apply the function <code>f</code> on the value <code>a</code> in <code>Left(a)</code> or <code>Both(a, b)</code> variants. If it is
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(B) -> M,</div></h4></section></summary><divclass="docblock"><p>Apply the function <code>f</code> on the value <code>b</code> in <code>Right(b)</code> or <code>Both(a, b)</code> variants.
G: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(B) -> R,</div></h4></section></summary><divclass="docblock"><p>Apply the functions <code>f</code> and <code>g</code> on the value <code>a</code> and <code>b</code> respectively;
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(A) -><aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><L, B>,</div></h4></section></summary><divclass="docblock"><p>Apply the function <code>f</code> on the value <code>a</code> in <code>Left(a)</code> or <code>Both(a, _)</code> variants if it is
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(B) -><aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, R>,</div></h4></section></summary><divclass="docblock"><p>Apply the function <code>f</code> on the value <code>b</code>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.or"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#287-293">source</a><h4class="code-header">pub fn <ahref="#method.or"class="fn">or</a>(self, l: A, r: B) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.tuple.html">(A, B)</a></h4></section></summary><divclass="docblock"><p>Returns a tuple consisting of the <code>l</code> and <code>r</code> in <code>Both(l, r)</code>, if present.
Otherwise, returns the wrapped value for the present element, and the supplied
value for the other. The first (<code>l</code>) argument is used for a missing <code>Left</code>
value. The second (<code>r</code>) argument is used for a missing <code>Right</code> value.</p>
<p>Arguments passed to <code>or</code> are eagerly evaluated; if you are passing
the result of a function call, it is recommended to use <ahref="enum.EitherOrBoth.html#method.or_else"title="method itertools::EitherOrBoth::or_else"><code>or_else</code></a>,
B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/default/trait.Default.html"title="trait core::default::Default">Default</a>,</div></h4></section></summary><divclass="docblock"><p>Returns a tuple consisting of the <code>l</code> and <code>r</code> in <code>Both(l, r)</code>, if present.
Otherwise, returns the wrapped value for the present element, and the <ahref="https://doc.rust-lang.org/1.77.1/core/default/trait.Default.html#tymethod.default"title="associated function core::default::Default::default"><code>default</code></a>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.or_else"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#324-330">source</a><h4class="code-header">pub fn <ahref="#method.or_else"class="fn">or_else</a><L: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>() -> A, R: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>() -> B>(self, l: L, r: R) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.tuple.html">(A, B)</a></h4></section></summary><divclass="docblock"><p>Returns a tuple consisting of the <code>l</code> and <code>r</code> in <code>Both(l, r)</code>, if present.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.left_or_insert"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#334-336">source</a><h4class="code-header">pub fn <ahref="#method.left_or_insert"class="fn">left_or_insert</a>(&mut self, val: A) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut A</a></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to the left value. If the left value is not present,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.right_or_insert"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#340-342">source</a><h4class="code-header">pub fn <ahref="#method.right_or_insert"class="fn">right_or_insert</a>(&mut self, val: B) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut B</a></h4></section></summary><divclass="docblock"><p>Returns a mutable reference to the right value. If the right value is not present,
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>() -> A,</div></h4></section></summary><divclass="docblock"><p>If the left value is not present, replace it the value computed by the closure <code>f</code>.
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>() -> B,</div></h4></section></summary><divclass="docblock"><p>If the right value is not present, replace it the value computed by the closure <code>f</code>.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_left"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#384-409">source</a><h4class="code-header">pub fn <ahref="#method.insert_left"class="fn">insert_left</a>(&mut self, val: A) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut A</a></h4></section></summary><divclass="docblock"><p>Sets the <code>left</code> value of this instance, and returns a mutable reference to it.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_right"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#426-450">source</a><h4class="code-header">pub fn <ahref="#method.insert_right"class="fn">insert_right</a>(&mut self, val: B) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut B</a></h4></section></summary><divclass="docblock"><p>Sets the <code>right</code> value of this instance, and returns a mutable reference to it.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.insert_both"class="method"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#454-463">source</a><h4class="code-header">pub fn <ahref="#method.insert_both"class="fn">insert_both</a>(&mut self, left: A, right: B) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut A</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut B</a>)</h4></section></summary><divclass="docblock"><p>Set <code>self</code> to <code>Both(..)</code>, containing the specified left and right values,
F: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>(T, T) -> T,</div></h4></section></summary><divclass="docblock"><p>Return either value of left, right, or apply a function <code>f</code> to both values if both are present.
Self: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass='docblock'>Feeds a slice of this type into the given <ahref="https://doc.rust-lang.org/1.77.1/core/hash/trait.Hasher.html"title="trait core::hash::Hasher"><code>Hasher</code></a>. <ahref="https://doc.rust-lang.org/1.77.1/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PartialEq-for-EitherOrBoth%3CA,+B%3E"class="impl"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#8">source</a><ahref="#impl-PartialEq-for-EitherOrBoth%3CA,+B%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>, B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a> for <aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, B></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.eq"class="method trait-impl"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#8">source</a><ahref="#method.eq"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html#tymethod.eq"class="fn">eq</a>(&self, other: &<aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, B>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.1/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><sectionid="impl-Eq-for-EitherOrBoth%3CA,+B%3E"class="impl"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#8">source</a><ahref="#impl-Eq-for-EitherOrBoth%3CA,+B%3E"class="anchor">§</a><h3class="code-header">impl<A: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a>, B: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a>><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, B></h3></section><sectionid="impl-StructuralPartialEq-for-EitherOrBoth%3CA,+B%3E"class="impl"><aclass="src rightside"href="../src/itertools/either_or_both.rs.html#8">source</a><ahref="#impl-StructuralPartialEq-for-EitherOrBoth%3CA,+B%3E"class="anchor">§</a><h3class="code-header">impl<A, B><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.StructuralPartialEq.html"title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, B></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-EitherOrBoth%3CA,+B%3E"class="impl"><ahref="#impl-RefUnwindSafe-for-EitherOrBoth%3CA,+B%3E"class="anchor">§</a><h3class="code-header">impl<A, B><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="enum"href="enum.EitherOrBoth.html"title="enum itertools::EitherOrBoth">EitherOrBoth</a><A, B><divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#804-806">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#789-791">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>