</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.open"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#110-119">source</a><h4class="code-header">pub fn <ahref="#method.open"class="fn">open</a>(index_path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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 a new bare Git index object as a memory representation of the Git
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.add"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#147-185">source</a><h4class="code-header">pub fn <ahref="#method.add"class="fn">add</a>(&mut self, entry: &<aclass="struct"href="struct.IndexEntry.html"title="struct git2::IndexEntry">IndexEntry</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 or update an index entry from an in-memory struct</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 or update an index entry from a buffer in memory</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.add_path"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#260-266">source</a><h4class="code-header">pub fn <ahref="#method.add_path"class="fn">add_path</a>(&mut self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 or update an index entry from a file on disk</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.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>Add or update index entries matching files in the working directory.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clear"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#345-350">source</a><h4class="code-header">pub fn <ahref="#method.clear"class="fn">clear</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 the contents (all the entries) of an index object.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.len"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#353-355">source</a><h4class="code-header">pub fn <ahref="#method.len"class="fn">len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Get the count of entries currently in the index</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_empty"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#358-360">source</a><h4class="code-header">pub fn <ahref="#method.is_empty"class="fn">is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return <code>true</code> is there is no entry in the index</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#363-372">source</a><h4class="code-header">pub fn <ahref="#method.get"class="fn">get</a>(&self, n: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.IndexEntry.html"title="struct git2::IndexEntry">IndexEntry</a>></h4></section></summary><divclass="docblock"><p>Get one of the entries in the index by its position.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.iter"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#375-380">source</a><h4class="code-header">pub fn <ahref="#method.iter"class="fn">iter</a>(&self) -><aclass="struct"href="struct.IndexEntries.html"title="struct git2::IndexEntries">IndexEntries</a><'_><ahref="#"class="tooltip"data-notable-ty="IndexEntries<'_>">ⓘ</a></h4></section></summary><divclass="docblock"><p>Get an iterator over the entries in this index.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.conflicts"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#383-393">source</a><h4class="code-header">pub fn <ahref="#method.conflicts"class="fn">conflicts</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.IndexConflicts.html"title="struct git2::IndexConflicts">IndexConflicts</a><'_>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Get an iterator over the index entries that have conflicts</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_path"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#396-406">source</a><h4class="code-header">pub fn <ahref="#method.get_path"class="fn">get_path</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>, stage: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.IndexEntry.html"title="struct git2::IndexEntry">IndexEntry</a>></h4></section></summary><divclass="docblock"><p>Get one of the entries in the index by its path.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.has_conflicts"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#411-413">source</a><h4class="code-header">pub fn <ahref="#method.has_conflicts"class="fn">has_conflicts</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Does this index have conflicts?</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.path"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#418-420">source</a><h4class="code-header">pub fn <ahref="#method.path"class="fn">path</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>></h4></section></summary><divclass="docblock"><p>Get the full path to the index file on disk.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.read"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#433-438">source</a><h4class="code-header">pub fn <ahref="#method.read"class="fn">read</a>(&mut self, force: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Update the contents of an existing index object in memory by reading
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.read_tree"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#443-448">source</a><h4class="code-header">pub fn <ahref="#method.read_tree"class="fn">read_tree</a>(&mut self, tree: &<aclass="struct"href="struct.Tree.html"title="struct git2::Tree">Tree</a><'_>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Read a tree into the index file with stats</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#451-457">source</a><h4class="code-header">pub fn <ahref="#method.remove"class="fn">remove</a>(&mut self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>, stage: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 an entry from the index</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove_path"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#467-473">source</a><h4class="code-header">pub fn <ahref="#method.remove_path"class="fn">remove_path</a>(&mut self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 an index entry corresponding to a file on disk.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.remove_dir"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#476-486">source</a><h4class="code-header">pub fn <ahref="#method.remove_dir"class="fn">remove_dir</a>(&mut self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.80.0/std/path/struct.Path.html"title="struct std::path::Path">Path</a>, stage: <aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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 entries from the index under a given directory.</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.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>Remove all matching index entries.</p>
I: <aclass="trait"href="https://doc.rust-lang.org/1.80.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>Update all index entries to match the working directory</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.write"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#558-563">source</a><h4class="code-header">pub fn <ahref="#method.write"class="fn">write</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.Error.html"title="struct git2::Error">Error</a>></h4></section></summary><divclass="docblock"><p>Write an existing index object from memory back to disk using an atomic
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.write_tree"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#576-584">source</a><h4class="code-header">pub fn <ahref="#method.write_tree"class="fn">write_tree</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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 the index as a tree.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.write_tree_to"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#590-598">source</a><h4class="code-header">pub fn <ahref="#method.write_tree_to"class="fn">write_tree_to</a>(&mut self, repo: &<aclass="struct"href="struct.Repository.html"title="struct git2::Repository">Repository</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.80.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 the index as a tree to the given repository</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.find_prefix"class="method"><aclass="src rightside"href="../src/git2/index.rs.html#603-614">source</a><h4class="code-header">pub fn <ahref="#method.find_prefix"class="fn">find_prefix</a><T: <aclass="trait"href="trait.IntoCString.html"title="trait git2::IntoCString">IntoCString</a>>(&self, prefix: T) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.80.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>Find the first position of any entries matching a prefix.</p>
<code><ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#805-807">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#812">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#790-792">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#797">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"IndexEntries<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.IndexEntries.html\" title=\"struct git2::IndexEntries\">IndexEntries</a><'index></code></h3><pre><code><div class=\"where\">impl<'index> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.IndexEntries.html\" title=\"struct git2::IndexEntries\">IndexEntries</a><'index></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.80.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.IndexEntry.html\" title=\"struct git2::IndexEntry\">IndexEntry</a>;</div>"}</script></section></div></main></body></html>