Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 62 variants Other(PyErr), UnknownFormat(String), NotBranchError(String, Option<String>), NoColocatedBranchSupport, DependencyNotPresent(String, String), PermissionDenied(PathBuf, Option<String>), UnsupportedProtocol(String, Option<String>), UnusableRedirect(String, String, String), ConnectionError(String), InvalidURL(String, Option<String>), TransportError(String), UnsupportedFormat(String), UnsupportedVcs(String), RemoteGitError(String), IncompleteRead(Vec<u8>, Option<usize>), LineEndingError(String), InvalidHttpResponse(String, String, Option<String>, HashMap<String, String>), AlreadyControlDir(PathBuf), AlreadyBranch(PathBuf), DivergedBranches, WorkspaceDirty(PathBuf), NoSuchFile(PathBuf), PointlessCommit, NoWhoami, NoSuchTag(String), TagAlreadyExists(String), Socket(Error), ForgeLoginRequired, UnsupportedForge(Url), ForgeProjectExists(String), MergeProposalExists(Url, Option<Url>), UnsupportedOperation(String, String), ProtectedBranchHookDeclined(String), NoRepositoryPresent, LockFailed(String), FileExists(PathBuf, Option<String>), LockContention(String, String), NotImplemented, NoSuchRevisionInTree(RevisionId), MissingNestedTree(PathBuf), ImmortalLimbo(PathBuf), MalformedTransform(Vec<RawConflict>), TransformRenameFailed(PathBuf, PathBuf, String, Error), UnexpectedHttpStatus { url: Url, code: u16, extra: Option<String>, headers: HashMap<String, String>, }, Timeout, BadHttpRequest(Url, String), TransportNotPossible(String), IncompatibleFormat(String, String), NoSuchRevision(RevisionId), RevisionNotPresent(RevisionId), NoSuchProject(String), ForkingDisabled(String), ProjectCreationTimeout(String, Duration), GitLabConflict(String), SourceNotDerivedFromTarget, BranchReferenceLoop, RedirectRequested { source: Url, target: Url, is_permanent: bool, }, ConflictsInTree, NoRoundtrippingSupport, NoCompatibleInter, ReadOnly, ObjectNotLocked(String),
}
Expand description

Error type for the Breezy Rust wrapper.

This enum represents the various errors that can occur when using the Breezy API through this Rust wrapper. Each variant corresponds to a specific error condition, with many mapping directly to Python exceptions from the Breezy library.

Variants§

§

Other(PyErr)

A Python error that doesn’t map to a specific variant.

§

UnknownFormat(String)

An unknown format was encountered.

§

NotBranchError(String, Option<String>)

The specified path is not a branch.

§

NoColocatedBranchSupport

The repository format doesn’t support colocated branches.

§

DependencyNotPresent(String, String)

A required dependency is not present.

§

PermissionDenied(PathBuf, Option<String>)

Permission was denied when accessing a path.

§

UnsupportedProtocol(String, Option<String>)

The specified protocol is not supported.

§

UnusableRedirect(String, String, String)

A redirect could not be followed.

§

ConnectionError(String)

A connection error occurred.

§

InvalidURL(String, Option<String>)

The specified URL is invalid.

§

TransportError(String)

An error occurred during transport.

§

UnsupportedFormat(String)

The specified format is not supported.

§

UnsupportedVcs(String)

The specified version control system is not supported.

§

RemoteGitError(String)

An error occurred when interacting with a remote Git repository.

§

IncompleteRead(Vec<u8>, Option<usize>)

A read operation did not complete (partial read).

§

LineEndingError(String)

An error occurred with line endings in a file.

§

InvalidHttpResponse(String, String, Option<String>, HashMap<String, String>)

An invalid HTTP response was received.

§

AlreadyControlDir(PathBuf)

A control directory already exists at the specified path.

§

AlreadyBranch(PathBuf)

A branch already exists at the specified path.

§

DivergedBranches

The branches have diverged.

§

WorkspaceDirty(PathBuf)

The workspace has uncommitted changes.

§

NoSuchFile(PathBuf)

The specified file does not exist.

§

PointlessCommit

The commit would not change anything.

§

NoWhoami

No user identity has been configured.

§

NoSuchTag(String)

The specified tag does not exist.

§

TagAlreadyExists(String)

The specified tag already exists.

§

Socket(Error)

A socket error occurred.

§

ForgeLoginRequired

Login to the forge is required.

§

UnsupportedForge(Url)

The specified forge is not supported.

§

ForgeProjectExists(String)

A project already exists on the forge.

§

MergeProposalExists(Url, Option<Url>)

A merge proposal already exists.

§

UnsupportedOperation(String, String)

The operation is not supported.

§

ProtectedBranchHookDeclined(String)

A protected branch hook declined the push.

§

NoRepositoryPresent

No repository is present at the specified location.

§

LockFailed(String)

Failed to acquire a lock.

§

FileExists(PathBuf, Option<String>)

A file already exists at the specified path.

§

LockContention(String, String)

Lock contention occurred.

§

NotImplemented

The requested operation is not implemented.

§

NoSuchRevisionInTree(RevisionId)

The specified revision is not in the tree.

§

MissingNestedTree(PathBuf)

A nested tree is missing at the specified path.

§

ImmortalLimbo(PathBuf)

Failed to delete transform temporary directory.

§

MalformedTransform(Vec<RawConflict>)

The transform is malformed.

§

TransformRenameFailed(PathBuf, PathBuf, String, Error)

Failed to rename a file during a transform operation.

§

UnexpectedHttpStatus

An unexpected HTTP status code was received.

Fields

§url: Url

The URL that was requested.

§code: u16

The HTTP status code that was received.

§extra: Option<String>

Additional information about the error.

§headers: HashMap<String, String>

The HTTP headers that were received.

§

Timeout

A timeout occurred.

§

BadHttpRequest(Url, String)

A bad HTTP request was made.

§

TransportNotPossible(String)

The transport is not possible.

§

IncompatibleFormat(String, String)

The format is not compatible.

§

NoSuchRevision(RevisionId)

The specified revision does not exist.

§

RevisionNotPresent(RevisionId)

The specified revision is not present in the repository.

§

NoSuchProject(String)

The specified project does not exist.

§

ForkingDisabled(String)

Forking is disabled for the specified project.

§

ProjectCreationTimeout(String, Duration)

The project creation timed out.

§

GitLabConflict(String)

A conflict occurred in GitLab.

§

SourceNotDerivedFromTarget

The source branch is not derived from the target branch.

§

BranchReferenceLoop

A loop was detected in branch references.

§

RedirectRequested

A redirect was requested.

Fields

§source: Url

The source URL.

§target: Url

The target URL.

§is_permanent: bool

Whether the redirect is permanent.

§

ConflictsInTree

There are conflicts in the tree.

§

NoRoundtrippingSupport

The operation does not support roundtripping.

§

NoCompatibleInter

No compatible inter-repository implementation was found.

§

ReadOnly

The resource is read-only.

§

ObjectNotLocked(String)

An object that needs to be locked is not locked.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for PyErr

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParseError> for Error

Source§

fn from(e: ParseError) -> Self

Converts to this type from the input type.
Source§

impl From<PyErr> for Error

Source§

fn from(err: PyErr) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Ungil for T
where T: Send,