<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../git2/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>Struct <ahref="index.html">git2</a>::<wbr><aclass="struct"href="#">Repository</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/git2/repo.rs.html#107-109">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct Repository { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>An owned git repository, representing all state associated with the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.open_bare"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#144-153">source</a><h4class="code-header">pub fn <ahref="#method.open_bare"class="fn">open_bare</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(path: P) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Attempt to open an already-existing bare repository at <code>path</code>.</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = O>,</div></h4></section></summary><divclass="docblock"><p>Find and open an existing repository, with additional options.</p>
<p>If flags contains <ahref="struct.RepositoryOpenFlags.html#associatedconstant.NO_SEARCH"title="associated constant git2::RepositoryOpenFlags::NO_SEARCH">NO_SEARCH</a>, the path must point
directly to a repository; otherwise, this may point to a subdirectory
of a repository, and <code>open_ext</code> will search up through parent
directories.</p>
<p>If flags contains <ahref="struct.RepositoryOpenFlags.html#associatedconstant.CROSS_FS"title="associated constant git2::RepositoryOpenFlags::CROSS_FS">CROSS_FS</a>, the search through parent
directories will not cross a filesystem boundary (detected when the
stat st_dev field changes).</p>
<p>If flags contains <ahref="struct.RepositoryOpenFlags.html#associatedconstant.BARE"title="associated constant git2::RepositoryOpenFlags::BARE">BARE</a>, force opening the repository as
bare even if it isn’t, ignoring any working directory, and defer
loading the repository configuration for performance.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.open_from_worktree"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#231-240">source</a><h4class="code-header">pub fn <ahref="#method.open_from_worktree"class="fn">open_from_worktree</a>(worktree: &<aclass="struct"href="struct.Worktree.html"title="struct git2::Worktree">Worktree</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Attempt to open an already-existing repository from a worktree.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.discover"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#246-261">source</a><h4class="code-header">pub fn <ahref="#method.discover"class="fn">discover</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(path: P) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Attempt to open an already-existing repository at or above <code>path</code></p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = O>,</div></h4></section></summary><divclass="docblock"><p>Attempt to find the path to a git repo for a given path</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates a new repository in the specified folder with the given options.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Clone a remote repository, initialize and update its submodules
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.from_odb"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#344-351">source</a><h4class="code-header">pub fn <ahref="#method.from_odb"class="fn">from_odb</a>(odb: <aclass="struct"href="struct.Odb.html"title="struct git2::Odb">Odb</a><'_>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Attempt to wrap an object database as a repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.revparse"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#377-391">source</a><h4class="code-header">pub fn <ahref="#method.revparse"class="fn">revparse</a>(&self, spec: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Revspec.html"title="struct git2::Revspec">Revspec</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Execute a rev-parse operation against the <code>spec</code> listed.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.revparse_single"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#394-402">source</a><h4class="code-header">pub fn <ahref="#method.revparse_single"class="fn">revparse_single</a>(&self, spec: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Object.html"title="struct git2::Object">Object</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find a single object, as specified by a revision string.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><(<aclass="struct"href="struct.Object.html"title="struct git2::Object">Object</a><'_>, <aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>>), <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find a single object and intermediate reference by a revision string.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_bare"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#430-432">source</a><h4class="code-header">pub fn <ahref="#method.is_bare"class="fn">is_bare</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Tests whether this repository is a bare repository or not.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_shallow"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#435-437">source</a><h4class="code-header">pub fn <ahref="#method.is_shallow"class="fn">is_shallow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Tests whether this repository is a shallow clone.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_worktree"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#440-442">source</a><h4class="code-header">pub fn <ahref="#method.is_worktree"class="fn">is_worktree</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Tests whether this repository is a worktree.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#445-448">source</a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Tests whether this repository is empty.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.path"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#452-457">source</a><h4class="code-header">pub fn <ahref="#method.path"class="fn">path</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a></h4></section></summary><divclass="docblock"><p>Returns the path to the <code>.git</code> folder for normal repositories or the
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.state"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#460-485">source</a><h4class="code-header">pub fn <ahref="#method.state"class="fn">state</a>(&self) -><aclass="enum"href="enum.RepositoryState.html"title="enum git2::RepositoryState">RepositoryState</a></h4></section></summary><divclass="docblock"><p>Returns the current state of this repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.workdir"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#490-499">source</a><h4class="code-header">pub fn <ahref="#method.workdir"class="fn">workdir</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>></h4></section></summary><divclass="docblock"><p>Get the path of the working directory for this repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the path to the working directory for this repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.namespace"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#523-525">source</a><h4class="code-header">pub fn <ahref="#method.namespace"class="fn">namespace</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>></h4></section></summary><divclass="docblock"><p>Get the currently active namespace for this repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.namespace_bytes"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#530-532">source</a><h4class="code-header">pub fn <ahref="#method.namespace_bytes"class="fn">namespace_bytes</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]></h4></section></summary><divclass="docblock"><p>Get the currently active namespace for this repository as a byte array.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_namespace"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#535-537">source</a><h4class="code-header">pub fn <ahref="#method.set_namespace"class="fn">set_namespace</a>(&self, namespace: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the active namespace for this repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_namespace_bytes"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#540-546">source</a><h4class="code-header">pub fn <ahref="#method.set_namespace_bytes"class="fn">set_namespace_bytes</a>(&self, namespace: &[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the active namespace for this repository as a byte array.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove_namespace"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#549-554">source</a><h4class="code-header">pub fn <ahref="#method.remove_namespace"class="fn">remove_namespace</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Remove the active namespace for this repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remotes"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#575-584">source</a><h4class="code-header">pub fn <ahref="#method.remotes"class="fn">remotes</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="string_array/struct.StringArray.html"title="struct git2::string_array::StringArray">StringArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>List all remotes for a given repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_remote"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#587-594">source</a><h4class="code-header">pub fn <ahref="#method.find_remote"class="fn">find_remote</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Remote.html"title="struct git2::Remote">Remote</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the information for a particular remote</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remote"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#598-606">source</a><h4class="code-header">pub fn <ahref="#method.remote"class="fn">remote</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>, url: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Remote.html"title="struct git2::Remote">Remote</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Add a remote with the default fetch refspec to the repository’s
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Remote.html"title="struct git2::Remote">Remote</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Add a remote with the provided fetch refspec to the repository’s
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="string_array/struct.StringArray.html"title="struct git2::string_array::StringArray">StringArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Give a remote a new name</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the remote’s URL for pushing in the configuration.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Sets the current head to the specified object and optionally resets
I: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</div></h4></section></summary><divclass="docblock"><p>Updates some entries in the index from the target commit tree.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.head"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#800-806">source</a><h4class="code-header">pub fn <ahref="#method.head"class="fn">head</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Retrieve and resolve the reference pointed at by HEAD.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_head"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#820-822">source</a><h4class="code-header">pub fn <ahref="#method.set_head"class="fn">set_head</a>(&self, refname: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Make the repository HEAD point to the specified reference.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_head_bytes"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#836-842">source</a><h4class="code-header">pub fn <ahref="#method.set_head_bytes"class="fn">set_head_bytes</a>(&self, refname: &[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Make the repository HEAD point to the specified reference as a byte array.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.head_detached"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#845-854">source</a><h4class="code-header">pub fn <ahref="#method.head_detached"class="fn">head_detached</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Determines whether the repository HEAD is detached.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_head_detached"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#866-874">source</a><h4class="code-header">pub fn <ahref="#method.set_head_detached"class="fn">set_head_detached</a>(&self, commitish: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Make the repository HEAD directly point to the commit.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Make the repository HEAD directly point to the commit.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.references"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#898-904">source</a><h4class="code-header">pub fn <ahref="#method.references"class="fn">references</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.References.html"title="struct git2::References">References</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create an iterator for the repo’s references</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.references_glob"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#908-918">source</a><h4class="code-header">pub fn <ahref="#method.references_glob"class="fn">references_glob</a>(&self, glob: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.References.html"title="struct git2::References">References</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create an iterator for the repo’s references that match the specified
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.submodules"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#921-957">source</a><h4class="code-header">pub fn <ahref="#method.submodules"class="fn">submodules</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="https://doc.rust-lang.org/1.78.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="struct.Submodule.html"title="struct git2::Submodule">Submodule</a><'_>>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Load all submodules for this repository and return them.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Statuses.html"title="struct git2::Statuses">Statuses</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Gather file status information and populate the returned structure.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.status_should_ignore"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#985-992">source</a><h4class="code-header">pub fn <ahref="#method.status_should_ignore"class="fn">status_should_ignore</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Test if the ignore rules apply to a given file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.status_file"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1010-1017">source</a><h4class="code-header">pub fn <ahref="#method.status_file"class="fn">status_file</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Status.html"title="struct git2::Status">Status</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get file status for a single file.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Branches.html"title="struct git2::Branches">Branches</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create an iterator which loops over the requested branches.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.index"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1037-1043">source</a><h4class="code-header">pub fn <ahref="#method.index"class="fn">index</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the Index file for this repository.</p>
<p>If a custom index has not been set, the default index for the repository
will be returned (the one located in .git/index).</p>
<p><strong>Caution</strong>: If the <ahref="struct.Repository.html"title="struct git2::Repository"><code>Repository</code></a> of this index is dropped, then this
<ahref="struct.Index.html"title="struct git2::Index"><code>Index</code></a> will become detached, and most methods on it will fail. See
<ahref="struct.Index.html#method.open"title="associated function git2::Index::open"><code>Index::open</code></a>. Be sure the repository has a binding such as a local
variable to keep it alive at least as long as the index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_index"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1046-1051">source</a><h4class="code-header">pub fn <ahref="#method.set_index"class="fn">set_index</a>(&self, index: &mut <aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the Index file for this repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.config"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1058-1064">source</a><h4class="code-header">pub fn <ahref="#method.config"class="fn">config</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Config.html"title="struct git2::Config">Config</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the configuration file for this repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the value of a git attribute for a path as a string.</p>
<p>This function will return a special string if the attribute is set to a special value.
Interpreting the special string is discouraged. You should always use
<ahref="enum.AttrValue.html#method.from_string"title="associated function git2::AttrValue::from_string"><code>AttrValue::from_string</code></a> to interpret the return value
and avoid the special string.</p>
<p>As such, the return type of this function will probably be changed in the next major version
to prevent interpreting the returned string without checking whether it’s special.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the value of a git attribute for a path as a byte slice.</p>
<p>This function will return a special byte slice if the attribute is set to a special value.
Interpreting the special byte slice is discouraged. You should always use
<ahref="enum.AttrValue.html#method.from_bytes"title="associated function git2::AttrValue::from_bytes"><code>AttrValue::from_bytes</code></a> to interpret the return value and
avoid the special string.</p>
<p>As such, the return type of this function will probably be changed in the next major version
to prevent interpreting the returned byte slice without checking whether it’s special.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.blob"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1120-1135">source</a><h4class="code-header">pub fn <ahref="#method.blob"class="fn">blob</a>(&self, data: &[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Write an in-memory buffer to the ODB as a blob.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.blob_path"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1142-1152">source</a><h4class="code-header">pub fn <ahref="#method.blob_path"class="fn">blob_path</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Read a file from the filesystem and write its content to the Object
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_blob"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1182-1188">source</a><h4class="code-header">pub fn <ahref="#method.find_blob"class="fn">find_blob</a>(&self, oid: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Blob.html"title="struct git2::Blob">Blob</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.odb"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1191-1197">source</a><h4class="code-header">pub fn <ahref="#method.odb"class="fn">odb</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Odb.html"title="struct git2::Odb">Odb</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the object database for this repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_odb"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1200-1205">source</a><h4class="code-header">pub fn <ahref="#method.set_odb"class="fn">set_odb</a>(&self, odb: &<aclass="struct"href="struct.Odb.html"title="struct git2::Odb">Odb</a><'_>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Override the object database for this repository</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Branch.html"title="struct git2::Branch">Branch</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new branch pointing at a target commit</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Branch.html"title="struct git2::Branch">Branch</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new branch pointing at a target commit</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Branch.html"title="struct git2::Branch">Branch</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a branch by its name in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create new commit in the repository</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a commit object and return that as a Buf.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a commit object from the given buffer and signature</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><(<aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>, <aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>), <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Extract the signature from a commit</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_commit"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1412-1418">source</a><h4class="code-header">pub fn <ahref="#method.find_commit"class="fn">find_commit</a>(&self, oid: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Commit.html"title="struct git2::Commit">Commit</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the commits in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Commit.html"title="struct git2::Commit">Commit</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the commits in a repository by short hash.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.AnnotatedCommit.html"title="struct git2::AnnotatedCommit">AnnotatedCommit</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates an <code>AnnotatedCommit</code> from the given commit id.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Object.html"title="struct git2::Object">Object</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Object.html"title="struct git2::Object">Object</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects by id prefix in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new direct reference.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Conditionally create new direct reference.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new symbolic reference.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new symbolic reference.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_reference"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1642-1649">source</a><h4class="code-header">pub fn <ahref="#method.find_reference"class="fn">find_reference</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reference.html"title="struct git2::Reference">Reference</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects in a repository.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.refname_to_id"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1669-1678">source</a><h4class="code-header">pub fn <ahref="#method.refname_to_id"class="fn">refname_to_id</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference by name and resolve immediately to OID.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.AnnotatedCommit.html"title="struct git2::AnnotatedCommit">AnnotatedCommit</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates a git_annotated_commit from the given reference.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.AnnotatedCommit.html"title="struct git2::AnnotatedCommit">AnnotatedCommit</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates a git_annotated_commit from FETCH_HEAD.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.signature"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1725-1731">source</a><h4class="code-header">pub fn <ahref="#method.signature"class="fn">signature</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Signature.html"title="struct git2::Signature">Signature</a><'static>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new action signature with default user and now timestamp.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Submodule.html"title="struct git2::Submodule">Submodule</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set up a new git submodule for checkout.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_submodule"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1770-1777">source</a><h4class="code-header">pub fn <ahref="#method.find_submodule"class="fn">find_submodule</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Submodule.html"title="struct git2::Submodule">Submodule</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup submodule information by name or path.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.SubmoduleStatus.html"title="struct git2::SubmoduleStatus">SubmoduleStatus</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the status for a submodule.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the ignore rule for the submodule in the configuration</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the update rule for the submodule in the configuration</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.submodule_set_url"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1830-1837">source</a><h4class="code-header">pub fn <ahref="#method.submodule_set_url"class="fn">submodule_set_url</a>(&mut self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>, url: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the URL for the submodule in the configuration</p>
<p>After calling this, you may wish to call <ahref="struct.Submodule.html#method.sync"title="method git2::Submodule::sync"><code>Submodule::sync</code></a> to write
the changes to the checked out submodule repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Set the branch for the submodule in the configuration</p>
<p>After calling this, you may wish to call <ahref="struct.Submodule.html#method.sync"title="method git2::Submodule::sync"><code>Submodule::sync</code></a> to write
the changes to the checked out submodule repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_tree"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1853-1859">source</a><h4class="code-header">pub fn <ahref="#method.find_tree"class="fn">find_tree</a>(&self, oid: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Tree.html"title="struct git2::Tree">Tree</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a reference to one of the objects in a repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.TreeBuilder.html"title="struct git2::TreeBuilder">TreeBuilder</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new TreeBuilder, optionally initialized with the
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new tag in the repository from an object</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new tag in the repository from an object without creating a reference.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new lightweight tag pointing at a target object</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_tag"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1976-1982">source</a><h4class="code-header">pub fn <ahref="#method.find_tag"class="fn">find_tag</a>(&self, id: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Tag.html"title="struct git2::Tag">Tag</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a tag object from the repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_tag_by_prefix"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#1985-1996">source</a><h4class="code-header">pub fn <ahref="#method.find_tag_by_prefix"class="fn">find_tag_by_prefix</a>(&self, prefix_hash: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Tag.html"title="struct git2::Tag">Tag</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lookup a tag object by prefix hash from the repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.tag_delete"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2002-2008">source</a><h4class="code-header">pub fn <ahref="#method.tag_delete"class="fn">tag_delete</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Delete an existing tag reference.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.tag_names"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2013-2030">source</a><h4class="code-header">pub fn <ahref="#method.tag_names"class="fn">tag_names</a>(&self, pattern: <aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="string_array/struct.StringArray.html"title="struct git2::string_array::StringArray">StringArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get a list with all the tags in the repository.</p>
T: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, &[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>]) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>iterate over all tags calling <code>cb</code> on each.
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Updates files in the index and the working tree to match the content of
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Updates files in the working tree to match the content of the index.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Updates files in the index and working tree to match the content of the
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Merges the given commit(s) into HEAD, writing the results into the
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Merge two commits, producing an index that reflects the result of
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Merge two trees, producing an index that reflects the result of
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.cleanup_state"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2209-2214">source</a><h4class="code-header">pub fn <ahref="#method.cleanup_state"class="fn">cleanup_state</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Remove all the metadata associated with an ongoing command like merge,
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><(<aclass="struct"href="struct.MergeAnalysis.html"title="struct git2::MergeAnalysis">MergeAnalysis</a>, <aclass="struct"href="struct.MergePreference.html"title="struct git2::MergePreference">MergePreference</a>), <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Analyzes the given branch(es) and determines the opportunities for
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><(<aclass="struct"href="struct.MergeAnalysis.html"title="struct git2::MergeAnalysis">MergeAnalysis</a>, <aclass="struct"href="struct.MergePreference.html"title="struct git2::MergePreference">MergePreference</a>), <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Analyzes the given branch(es) and determines the opportunities for
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Rebase.html"title="struct git2::Rebase">Rebase</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Initializes a rebase operation to rebase the changes in <code>branch</code>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Rebase.html"title="struct git2::Rebase">Rebase</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Opens an existing rebase that was previously started by either an
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Add a note for an object</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.note_default_ref"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2346-2352">source</a><h4class="code-header">pub fn <ahref="#method.note_default_ref"class="fn">note_default_ref</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="https://doc.rust-lang.org/1.78.0/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the default notes reference for this repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.notes"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2362-2369">source</a><h4class="code-header">pub fn <ahref="#method.notes"class="fn">notes</a>(&self, notes_ref: <aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Notes.html"title="struct git2::Notes">Notes</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates a new iterator for notes in this repository.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Note.html"title="struct git2::Note">Note</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Read the note for an object.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Remove the note for an object.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.revwalk"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2413-2419">source</a><h4class="code-header">pub fn <ahref="#method.revwalk"class="fn">revwalk</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Revwalk.html"title="struct git2::Revwalk">Revwalk</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a revwalk that can be used to traverse the commit graph.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Blame.html"title="struct git2::Blame">Blame</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get the blame for a single file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.merge_base"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2442-2455">source</a><h4class="code-header">pub fn <ahref="#method.merge_base"class="fn">merge_base</a>(&self, one: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, two: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find a merge base between two commits</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.merge_base_many"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2458-2472">source</a><h4class="code-header">pub fn <ahref="#method.merge_base_many"class="fn">merge_base_many</a>(&self, oids: &[<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find a merge base given a list of commits</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.merge_bases"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2475-2489">source</a><h4class="code-header">pub fn <ahref="#method.merge_bases"class="fn">merge_bases</a>(&self, one: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, two: <aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="oid_array/struct.OidArray.html"title="struct git2::oid_array::OidArray">OidArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find all merge bases between two commits</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.merge_bases_many"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2492-2506">source</a><h4class="code-header">pub fn <ahref="#method.merge_bases_many"class="fn">merge_bases_many</a>(&self, oids: &[<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="oid_array/struct.OidArray.html"title="struct git2::oid_array::OidArray">OidArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find all merge bases given a list of commits</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.usize.html">usize</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.usize.html">usize</a>), <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Count the number of unique commits between two commit objects</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Determine if a commit is the descendant of another commit</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reflog"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2548-2555">source</a><h4class="code-header">pub fn <ahref="#method.reflog"class="fn">reflog</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Reflog.html"title="struct git2::Reflog">Reflog</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Read the reflog for the given reference</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reflog_delete"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2558-2564">source</a><h4class="code-header">pub fn <ahref="#method.reflog_delete"class="fn">reflog_delete</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Delete the reflog for the given reference</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reference_has_log"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2579-2583">source</a><h4class="code-header">pub fn <ahref="#method.reference_has_log"class="fn">reference_has_log</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Check if the given reference has a reflog.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.reference_ensure_log"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2586-2592">source</a><h4class="code-header">pub fn <ahref="#method.reference_ensure_log"class="fn">reference_ensure_log</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Ensure that the given reference has a reflog.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Directly run a diff on two blobs.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff with the difference between two tree objects.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff between a tree and repository index.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff between two index objects.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff between the repository index and the workdir directory.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff between a tree and the working directory.</p>
<p>The tree you provide will be used for the “old_file” side of the delta,
and the working directory will be used for the “new_file” side.</p>
<p>This is not the same as <code>git diff <treeish></code> or <code>git diff-index <treeish></code>. Those commands use information from the index, whereas this
function strictly returns the differences between the tree and the files
in the working directory, regardless of the state of the index. Use
<code>tree_to_workdir_with_index</code> to emulate those commands.</p>
<p>To see difference between this and <code>tree_to_workdir_with_index</code>,
consider the example of a staged file deletion where the file has then
been put back into the working dir and further modified. The
tree-to-workdir diff for that file is ‘modified’, but <code>git diff</code> would
show status ‘deleted’ since there is a staged delete.</p>
<p>If <code>None</code> is passed for <code>tree</code>, then an empty tree is used.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Diff.html"title="struct git2::Diff">Diff</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a diff between a tree and the working directory using index data
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Save the local modifications to a new stash.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Save the local modifications to a new stash.
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Like <code>stash_save</code> but with more options like selective statshing via path patterns.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Apply a single stashed state from the stash list.</p>
C: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.usize.html">usize</a>, &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>, &<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Loop over all the stashed states and issue a callback for each one.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.stash_drop"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2947-2952">source</a><h4class="code-header">pub fn <ahref="#method.stash_drop"class="fn">stash_drop</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Remove a single stashed state from the stash list.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Apply a single stashed state from the stash list and remove it from the list if successful.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.add_ignore_rule"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2970-2976">source</a><h4class="code-header">pub fn <ahref="#method.add_ignore_rule"class="fn">add_ignore_rule</a>(&self, rules: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Add ignore rules for a repository.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear_ignore_rules"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2979-2984">source</a><h4class="code-header">pub fn <ahref="#method.clear_ignore_rules"class="fn">clear_ignore_rules</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Clear ignore rules that were explicitly added.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_path_ignored"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#2987-2998">source</a><h4class="code-header">pub fn <ahref="#method.is_path_ignored"class="fn">is_path_ignored</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.78.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(&self, path: P) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Test if the ignore rules apply to a given path.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create an index of uncommitted changes, representing the result of
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.branch_remote_name"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3042-3049">source</a><h4class="code-header">pub fn <ahref="#method.branch_remote_name"class="fn">branch_remote_name</a>(&self, refname: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Find the remote name of a remote-tracking branch</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.branch_upstream_name"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3053-3060">source</a><h4class="code-header">pub fn <ahref="#method.branch_upstream_name"class="fn">branch_upstream_name</a>(&self, refname: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Retrieves the name of the reference supporting the remote tracking branch,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.branch_upstream_remote"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3063-3074">source</a><h4class="code-header">pub fn <ahref="#method.branch_upstream_remote"class="fn">branch_upstream_remote</a>(&self, refname: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Buf.html"title="struct git2::Buf">Buf</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Retrieve the name of the upstream remote of a local branch.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Apply a Diff to the given repo, making changes directly in the working directory, the index, or both.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Apply a Diff to the provided tree, and return the resulting Index.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Reverts the given commit, producing changes in the index and working directory.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Index.html"title="struct git2::Index">Index</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Reverts the given commit against the given “our” commit,
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.worktrees"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3156-3165">source</a><h4class="code-header">pub fn <ahref="#method.worktrees"class="fn">worktrees</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="string_array/struct.StringArray.html"title="struct git2::string_array::StringArray">StringArray</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Lists all the worktrees for the repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_worktree"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3170-3177">source</a><h4class="code-header">pub fn <ahref="#method.find_worktree"class="fn">find_worktree</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Worktree.html"title="struct git2::Worktree">Worktree</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Opens a worktree by name for the given repository</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Worktree.html"title="struct git2::Worktree">Worktree</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Creates a new worktree for the repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.transaction"class="method"><aclass="src rightside"href="../src/git2/repo.rs.html#3203-3209">source</a><h4class="code-header">pub fn <ahref="#method.transaction"class="fn">transaction</a><'a>(&'a self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.Transaction.html"title="struct git2::Transaction">Transaction</a><'a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Create a new transaction</p>
C: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>If a merge is in progress, invoke ‘callback’ for each commit ID in the
C: <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(&<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.str.html">str</a>, &[<aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.u8.html">u8</a>], &<aclass="struct"href="struct.Oid.html"title="struct git2::Oid">Oid</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.78.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><divclass="docblock"><p>Invoke ‘callback’ for each entry in the given FETCH_HEAD file.</p>
<code><ahref="https://doc.rust-lang.org/1.78.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.78.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.78.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.78.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-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.78.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.78.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.78.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.78.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.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.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.78.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.78.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.78.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"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.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.78.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.78.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.78.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.78.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.78.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>