Enum radicle_surf::vcs::git::error::Error[][src]

#[non_exhaustive]pub enum Error {
    NotBranch(BranchName),
    ParseRemoteBranch(BranchName),
    NotTag(TagName),
    RevParseFailure {
        rev: String,
    },
    NamespaceRevParseFailure {
        namespace: Namespace,
        rev: String,
    },
    EmptyNamespace,
    Utf8Error(Utf8Error),
    MissingSummary,
    FileSystem(Error),
    LastCommitException,
    PathNotFound(Path),
    Diff(Error),
    Git(Error),
}

Enumeration of errors that can occur in operations from crate::vcs::git.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotBranch(BranchName)

The user tried to fetch a branch, but the name provided does not exist as a branch. This could mean that the branch does not exist or that a tag or commit was provided by accident.

ParseRemoteBranch(BranchName)

We tried to convert a name into its remote and branch name parts.

NotTag(TagName)

The user tried to fetch a tag, but the name provided does not exist as a tag. This could mean that the tag does not exist or that a branch or commit was provided by accident.

RevParseFailure

A revspec was provided that could not be parsed into a branch, tag, or commit object.

Fields of RevParseFailure

rev: String

The provided revspec that failed to parse.

NamespaceRevParseFailure

A revspec was provided that could not be found in the given namespace.

Fields of NamespaceRevParseFailure

namespace: Namespace

The namespace we are in when attempting to fetch the rev.

rev: String

The provided revspec that failed to parse.

EmptyNamespace

When parsing a namespace we may come across one that was an empty string.

Utf8Error(Utf8Error)

A str::Utf8Error error, which usually occurs when a git object’s name is not in UTF-8 form and parsing of it as such fails.

MissingSummary

When trying to get the summary for a git2::Commit some action failed.

FileSystem(Error)

An error that comes from performing a crate::file_system operation.

LastCommitException

While attempting to calculate a diff for retrieving the [crate::vcs::git::Browser.last_commit()], the file path was returned as an Option::None.

PathNotFound(Path)

The requested file was not found.

Diff(Error)

An error that comes from performing a diff operations.

Git(Error)

A wrapper around the generic git2::Error.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Utf8Error> for Error[src]

impl PartialEq<Error> for Error[src]

impl StructuralPartialEq for Error[src]

impl<'a> VCS<Commit, Error> for RepositoryRef<'a>[src]

type HistoryId = Rev

The way to identify a History.

type ArtefactId = Oid

The way to identify an artefact.

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.