pub enum Error {
Discovery {
path: String,
},
Worktree {
path: String,
},
Head {
path: String,
},
ReferenceNotInRepo {
path: String,
reference: String,
},
NoTreeForCommit {
path: String,
commit: String,
tree: String,
},
Revwalk {
path: String,
},
CommandError {
path: String,
cmd: String,
error: String,
},
Diff {
path: String,
tree1: String,
tree2: String,
},
Branch {
path: String,
name: String,
},
}
Variants§
Implementations§
Source§impl Error
impl Error
pub fn discovery<T>(path: &Path) -> Result<T, Error>
pub fn worktree<T>(path: &Path) -> Result<T, Error>
pub fn head<T>(path: &Path) -> Result<T, Error>
pub fn ref_not_in_repo(repo: &Repository, reference: &Reference<'_>) -> Self
pub fn ref_not_in_repo_err<T>( repo: &Repository, reference: &Reference<'_>, ) -> Result<T, Error>
pub fn id_not_in_repo(repo: &Repository, id: &Oid) -> Self
pub fn id_not_in_repo_err<T>( repo: &Repository, commit: &Commit<'_>, ) -> Result<T, Error>
pub fn no_tree_for_commit(repo: &Repository, commit: &Commit<'_>) -> Self
pub fn no_tree_for_commit_err<T>( repo: &Repository, commit: &Commit<'_>, ) -> Result<T, Error>
pub fn revwalk_err<T>(repo: &Repository) -> Result<T, Error>
pub fn revwalk(repo: &Repository) -> Error
pub fn command_err<T>( repo: &Repository, cmd: &'static str, err: &Error, ) -> Result<T, Error>
pub fn diff_tree(repo: &Repository, tree1: &Tree<'_>, tree2: &Tree<'_>) -> Self
pub fn diff_tree_err<T>( repo: &Repository, tree1: &Tree<'_>, tree2: &Tree<'_>, ) -> Result<T, Self>
pub fn branch_err<T>(repo: &Repository, name: &str) -> Result<T, Error>
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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