pub struct Commit<'a> {
pub ptr: *mut IrminCommit,
/* private fields */
}Expand description
Wrapper around Irmin commits
Fields§
§ptr: *mut IrminCommitImplementations§
Source§impl<'a> Commit<'a>
impl<'a> Commit<'a>
Sourcepub fn new<T: Contents>(
repo: &'a Repo<T>,
parents: impl AsRef<[&'a Commit<'a>]>,
tree: &Tree<'_, T>,
info: Info<'_>,
) -> Result<Commit<'a>, Error>
pub fn new<T: Contents>( repo: &'a Repo<T>, parents: impl AsRef<[&'a Commit<'a>]>, tree: &Tree<'_, T>, info: Info<'_>, ) -> Result<Commit<'a>, Error>
Create a new commit
Sourcepub fn of_hash<T: Contents>(
repo: &'a Repo<T>,
hash: &Hash<'_>,
) -> Result<Option<Commit<'a>>, Error>
pub fn of_hash<T: Contents>( repo: &'a Repo<T>, hash: &Hash<'_>, ) -> Result<Option<Commit<'a>>, Error>
Find the commit associated with the given hash
Sourcepub fn of_key<T: Contents>(
repo: &'a Repo<T>,
key: &CommitKey<'_>,
) -> Result<Option<Commit<'a>>, Error>
pub fn of_key<T: Contents>( repo: &'a Repo<T>, key: &CommitKey<'_>, ) -> Result<Option<Commit<'a>>, Error>
Find the commit associated with the given key
pub fn tree<T: Contents>(&self) -> Result<Tree<'_, T>, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Commit<'a>
impl<'a> RefUnwindSafe for Commit<'a>
impl<'a> !Send for Commit<'a>
impl<'a> !Sync for Commit<'a>
impl<'a> Unpin for Commit<'a>
impl<'a> UnwindSafe for Commit<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more