<!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="Structure describing options about how the diff should be executed."><title>DiffOptions in git2 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-dd39b87e5fcfba68.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="git2"data-themes=""data-resource-suffix=""data-rustdoc-version="1.80.0 (051478957 2024-07-21)"data-channel="1.80.0"data-search-js="search-d52510db62a78183.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-118b08c4c78b968e.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-20a3ad099b048cf2.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-df360f571f6edeae.css"></noscript><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 struct"><!--[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="../git2/index.html">git2</a><spanclass="version">0.18.3</span></h2></div><h2class="location"><ahref="#">DiffOptions</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.context_lines">context_lines</a></li><li><ahref="#method.disable_pathspec_match">disable_pathspec_match</a></li><li><ahref="#method.enable_fast_untracked_dirs">enable_fast_untracked_dirs</a></li><li><ahref="#method.force_binary">force_binary</a></li><li><ahref="#method.force_text">force_text</a></li><li><ahref="#method.id_abbrev">id_abbrev</a></li><li><ahref="#method.ignore_blank_lines">ignore_blank_lines</a></li><li><ahref="#method.ignore_case">ignore_case</a></li><li><ahref="#method.ignore_filemode">ignore_filemode</a></li><li><ahref="#method.ignore_submodules">ignore_submodules</a></li><li><ahref="#method.ignore_whitespace">ignore_whitespace</a></li><li><ahref="#method.ignore_whitespace_change">ignore_whitespace_change</a></li><li><ahref="#method.ignore_whitespace_eol">ignore_whitespace_eol</a></li><li><ahref="#method.include_ignored">include_ignored</a></li><li><ahref="#method.include_typechange">include_typechange</a></li><li><ahref="#method.include_typechange_trees">include_typechange_trees</a></li><li><ahref="#method.include_unmodified">include_unmodified</a></li><li><ahref="#method.include_unreadable">include_unreadable</a></li><li><ahref="#method.include_unreadable_as_untracked">include_unreadable_as_untracked</a></li><li><ahref="#method.include_untracked">include_untracked</a></li><li><ahref="#method.indent_heuristic">indent_heuristic</a></li><li><ahref="#method.interhunk_lines">interhunk_lines</a></li><li><ahref="#method.max_size">max_size</a></li><li><ahref="#method.minimal">minimal</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.new_prefix">new_prefix</a></li><li><ahref="#method.old_prefix">old_prefix</a></li><li><ahref="#method.pathspec">pathspec</a></li><li><ahref="#method.patience">patience</a></li><li><ahref="#me
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-DiffOptions"class="impl"><aclass="src rightside"href="../src/git2/diff.rs.html#667-947">source</a><ahref="#impl-DiffOptions"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#672-682">source</a><h4class="code-header">pub fn <ahref="#method.new"class="fn">new</a>() -><aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Creates a new set of empty diff options.</p>
<p>All flags and other options are defaulted to false or their otherwise
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reverse"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#695-697">source</a><h4class="code-header">pub fn <ahref="#method.reverse"class="fn">reverse</a>(&mut self, reverse: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Flag indicating whether the sides of the diff will be reversed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.include_unmodified"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#721-723">source</a><h4class="code-header">pub fn <ahref="#method.include_unmodified"class="fn">include_unmodified</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Flag indicating whether unmodified files are in the diff.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.include_typechange"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#726-728">source</a><h4class="code-header">pub fn <ahref="#method.include_typechange"class="fn">include_typechange</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>If enabled, then Typechange delta records are generated.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.include_typechange_trees"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#735-737">source</a><h4class="code-header">pub fn <ahref="#method.include_typechange_trees"class="fn">include_typechange_trees</a>(&mut self, include: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Event with <code>include_typechange</code>, the tree returned generally shows a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ignore_submodules"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#745-747">source</a><h4class="code-header">pub fn <ahref="#method.ignore_submodules"class="fn">ignore_submodules</a>(&mut self, ignore: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Flag indicating whether all submodules should be treated as unmodified.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ignore_case"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#750-752">source</a><h4class="code-header">pub fn <ahref="#method.ignore_case"class="fn">ignore_case</a>(&mut self, ignore: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Flag indicating whether case insensitive filenames should be used.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.disable_pathspec_match"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#756-758">source</a><h4class="code-header">pub fn <ahref="#method.disable_pathspec_match"class="fn">disable_pathspec_match</a>(&mut self, disable: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>If pathspecs are specified, this flag means that they should be applied
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.skip_binary_check"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#763-765">source</a><h4class="code-header">pub fn <ahref="#method.skip_binary_check"class="fn">skip_binary_check</a>(&mut self, skip: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Disable updating the <code>binary</code> flag in delta records. This is useful when
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.enable_fast_untracked_dirs"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#775-777">source</a><h4class="code-header">pub fn <ahref="#method.enable_fast_untracked_dirs"class="fn">enable_fast_untracked_dirs</a>(&mut self, enable: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>When diff finds an untracked directory, to match the behavior of core
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.update_index"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#783-785">source</a><h4class="code-header">pub fn <ahref="#method.update_index"class="fn">update_index</a>(&mut self, update: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>When diff finds a file in the working directory with stat information
) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Include unreadable files in the diff as untracked files</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ignore_whitespace_change"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#813-815">source</a><h4class="code-header">pub fn <ahref="#method.ignore_whitespace_change"class="fn">ignore_whitespace_change</a>(&mut self, ignore: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Ignore changes in the amount of whitespace</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ignore_whitespace_eol"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#818-820">source</a><h4class="code-header">pub fn <ahref="#method.ignore_whitespace_eol"class="fn">ignore_whitespace_eol</a>(&mut self, ignore: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Ignore whitespace at the end of line</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.show_unmodified"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#840-842">source</a><h4class="code-header">pub fn <ahref="#method.show_unmodified"class="fn">show_unmodified</a>(&mut self, show: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>When generating output, include the names of unmodified files if they
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.minimal"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#850-852">source</a><h4class="code-header">pub fn <ahref="#method.minimal"class="fn">minimal</a>(&mut self, minimal: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Take extra time to find the minimal diff</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.show_binary"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#856-858">source</a><h4class="code-header">pub fn <ahref="#method.show_binary"class="fn">show_binary</a>(&mut self, show: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Include the necessary deflate/delta information so that <code>git-apply</code> can
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.indent_heuristic"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#863-865">source</a><h4class="code-header">pub fn <ahref="#method.indent_heuristic"class="fn">indent_heuristic</a>(&mut self, heuristic: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Use a heuristic that takes indentation and whitespace into account
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.context_lines"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#871-874">source</a><h4class="code-header">pub fn <ahref="#method.context_lines"class="fn">context_lines</a>(&mut self, lines: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Set the number of unchanged lines that define the boundary of a hunk
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.interhunk_lines"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#880-883">source</a><h4class="code-header">pub fn <ahref="#method.interhunk_lines"class="fn">interhunk_lines</a>(&mut self, lines: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Set the maximum number of unchanged lines between hunk boundaries before
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.id_abbrev"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#886-889">source</a><h4class="code-header">pub fn <ahref="#method.id_abbrev"class="fn">id_abbrev</a>(&mut self, abbrev: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.u16.html">u16</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>The default value for this is <code>core.abbrev</code> or 7 if unset.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.max_size"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#897-900">source</a><h4class="code-header">pub fn <ahref="#method.max_size"class="fn">max_size</a>(&mut self, size: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.i64.html">i64</a>) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Maximum size (in bytes) above which a blob will be marked as binary
<p>A negative value will disable this entirely.</p>
<p>The default value for this is 512MB.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.old_prefix"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#905-908">source</a><h4class="code-header">pub fn <ahref="#method.old_prefix"class="fn">old_prefix</a><T: <aclass="trait"href="trait.IntoCString.html"title="trait git2::IntoCString">IntoCString</a>>(&mut self, t: T) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>The virtual “directory” to prefix old file names with in hunk headers.</p>
<p>The default value for this is “a”.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.new_prefix"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#913-916">source</a><h4class="code-header">pub fn <ahref="#method.new_prefix"class="fn">new_prefix</a><T: <aclass="trait"href="trait.IntoCString.html"title="trait git2::IntoCString">IntoCString</a>>(&mut self, t: T) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>The virtual “directory” to prefix new file names with in hunk headers.</p>
<p>The default value for this is “b”.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pathspec"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#919-924">source</a><h4class="code-header">pub fn <ahref="#method.pathspec"class="fn">pathspec</a><T: <aclass="trait"href="trait.IntoCString.html"title="trait git2::IntoCString">IntoCString</a>>(&mut self, pathspec: T) ->&mut <aclass="struct"href="struct.DiffOptions.html"title="struct git2::DiffOptions">DiffOptions</a></h4></section></summary><divclass="docblock"><p>Add to the array of paths/fnmatch patterns to constrain the diff.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.raw"class="method"><aclass="src rightside"href="../src/git2/diff.rs.html#930-944">source</a><h4class="code-header">pub unsafe fn <ahref="#method.raw"class="fn">raw</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.pointer.html">*const </a><aclass="struct"href="../libgit2_sys/struct.git_diff_options.html"title="struct libgit2_sys::git_diff_options">git_diff_options</a></h4></section></summary><divclass="docblock"><p>Acquire a pointer to the underlying raw options.</p>
<code><ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#805-807">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.80.0/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.80.0/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"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.80.0/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.80.0/src/core/convert/mod.rs.html#812">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/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.80.0/src/core/convert/mod.rs.html#790-792">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.80.0/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.80.0/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-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/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.80.0/src/core/convert/mod.rs.html#797">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/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>