Struct rubbish::fs::Commit
[−]
[src]
pub struct Commit { /* fields omitted */ }
Methods
impl Commit
[src]
fn root() -> Commit
Create the root commit (no parents, empty tree)
fn tree(&self) -> Tree
Get the tree at this commit
fn make_child<F>(&self, modifier: F) -> Result<Commit, String> where
F: FnMut(Tree) -> Result<Tree, String>,
F: FnMut(Tree) -> Result<Tree, String>,
Create a child commit based on this one, applying the modifier function to the enclosed tree. This function can call any Tree methods, or even return an entirely unrelated Tree. If the modifier returns an error, make_child does as well.
fn retrieve(storage: &ObjectStorage, commit: Hash) -> Result<Commit, String>
Get a commit from storage, given its hash
fn store(&self, storage: &mut ObjectStorage) -> Hash
Store this commit and return the hash
Trait Implementations
impl Debug for Commit
[src]
impl Clone for Commit
[src]
fn clone(&self) -> Commit
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more