Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 58 variants Io(Error), Core(Error), ObjectNotFound { checksum: Checksum, ty: ObjectType, }, RefNotFound(String), RemoteNotFound(String), RemoteExists(String), RepoExists(PathBuf), InvalidRefspec(String), AmbiguousRefspec(String), RefNotWritable { name: String, reason: String, }, NotARef { name: String, reason: String, }, RefMismatch { name: String, expected: Option<Checksum>, current: Option<Checksum>, }, NoParentCommit(Checksum), InvalidFormat(String), Unsupported(String), InvalidInput(String), LockTimeout { secs: i64, }, ChecksumMismatch { expected: Checksum, actual: Checksum, }, InsufficientFreeSpace { shortfall: u64, }, MutableTree(String), UnsupportedOverlayFeature(String), PathNotFound { path: String, }, NotADirectory { path: String, }, DanglingSymlink { path: String, target: String, }, SymlinkLoop { path: String, }, EntryExists { path: String, }, Staging(String), MergeConflict(String), Checkout(String), SubpathNotFound(PathBuf), SubpathNotADirectory(PathBuf), RequireHardlinks(String), HardlinkAcrossDevices { src: u64, dst: u64, }, Tar(String), ConsumeUnlink { name: String, reason: String, }, ReplaceDirWithFile(String), ReplaceFileWithDir(String), TarMissingParent(String), Signature(String), Pull(String), Fetch(String), HttpStatus { status: u16, url: String, }, RedirectLimit { url: String, hops: u32, }, FetchTooLarge { limit: u64, }, ContentEncoded { url: String, encoding: String, }, UploadInterrupted { url: String, message: String, }, InvalidRelations { commit: Option<Checksum>, field: RelationField, reason: String, }, Remote(Error), StaticDeltaNotFound { from: Option<Checksum>, to: Checksum, }, ComposefsDigestMismatch { commit: Checksum, expected: [u8; 32], actual: [u8; 32], }, InvalidComposefsImage { commit: Checksum, relation: ComposefsImageSource, image: Checksum, defect: Box<ComposefsImageDefect>, }, MediaNotFound { skipped: Vec<(PathBuf, MediaSkip)>, }, AmbiguousMedia { paths: Vec<PathBuf>, }, BucketLocked { address: String, holder: Option<Box<LockHolder>>, }, BucketLockLost { address: String, holder: Option<Box<LockHolder>>, }, BucketNoExclusion { address: String, }, BucketRepairIncomplete { address: String, report: Box<BucketFsckReport>, error: Box<Error>, }, BucketSummaryIncomplete { address: String, summary_written: bool, report: Box<BucketSummaryReport>, error: Box<Error>, },
}
Expand description

The error of each fallible operation of this crate.

The enum is #[non_exhaustive], so a release can add a variant without a breaking change. The signing engines and the fetcher have their own error types, ostrya_sign::Error and fetch::Error. Each of the two converts into this type.

Variants (Non-exhaustive)§

This enum is marked as 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.
§

Io(Error)

An I/O error.

§

Core(Error)

An error from the format primitives: checksums, key files, and objects.

§

ObjectNotFound

An object that is not in the object store.

Fields

§checksum: Checksum

The checksum of the object that the lookup asked for.

§ty: ObjectType

The type of the object that the lookup asked for.

§

RefNotFound(String)

A refspec that does not resolve to a commit.

The payload is the ref as text: <name>, <remote>:<name>, or @<collection-id>:<name> for a collection ref.

§

RemoteNotFound(String)

A remote with no [remote "<name>"] group in the configuration.

The payload is the name of the remote.

§

RemoteExists(String)

A remote that already has a [remote "<name>"] group in the configuration.

The payload is the name of the remote.

§

RepoExists(PathBuf)

A path where Repo::create must create a repository, and that holds an entry config of any type.

The payload is the path as the caller gave it.

§

InvalidRefspec(String)

A refspec that does not name a path in the refs/ tree.

The causes are:

  • an empty name
  • an empty, ., or .. component
  • a remote element or a collection element that holds a /
  • an interior NUL

The payload is the refspec as the caller gave it. A Ref value gives its text: <name>, <remote>:<name>, or @<collection-id>:<name> for a collection ref.

§

AmbiguousRefspec(String)

An abbreviated checksum that is the prefix of two or more commit objects.

Such a checksum names no single commit. The payload is the revision as the caller gave it.

§

RefNotWritable

A ref write or a ref removal that the ref store cannot take.

Transaction::commit gives this error when it checks the queued refs under the update lock. The cause is a ref path that names an alias, names a directory, passes through a file or an alias, or names a special file, or two queued refs where the path of one names a directory of the other and one of the two is a write. The published objects stay, and the commit writes no detached metadata and no ref.

Repo::set_ref_immediate and UpdateGuard::set_ref give this error for a ref path that names an alias or passes through an alias. Repo::set_ref_alias_immediate and UpdateGuard::set_ref_alias give it for a path that passes through an alias. Repo::remove_ref_alias_immediate and UpdateGuard::remove_ref_alias give it for a path that names a ref file, names a directory, passes through a file or an alias, or names a special file. Repo::prune gives it for a weak ref to delete whose path passes through an alias.

Fields

§name: String

The ref as text: <name>, <remote>:<name>, or @<collection-id>:<name> for a collection ref.

§reason: String

The cause, for example names a directory.

§

NotARef

A ref path that names an entry that is not a regular file, such as a directory, a FIFO, or a socket.

Fields

§name: String

The ref as text: <name>, <remote>:<name>, or @<collection-id>:<name> for a collection ref.

§reason: String

The cause, for example is not a regular file.

§

RefMismatch

A conditional ref write whose ref does not have the expected state.

Transaction::commit gives this error when it compares a write of Transaction::set_ref_expecting with the ref store under the update lock. The message shows an absent ref as absent. The published objects stay, and the commit writes no detached metadata and no ref.

Fields

§name: String

The ref as text: <name>, <remote>:<name>, or @<collection-id>:<name> for a collection ref.

§expected: Option<Checksum>

The commit that the caller expected, or None for an absent ref.

§current: Option<Checksum>

The commit of the ref file, or None for an absent ref.

§

NoParentCommit(Checksum)

A ^ suffix of a revision that asks for the parent of a root commit.

The payload is the checksum of the root commit.

§

InvalidFormat(String)

Data that does not match its expected format.

§

Unsupported(String)

An operation or a repository feature that this crate does not support.

A fetch::Error::Unsupported converts to this variant.

§

InvalidInput(String)

An argument outside the values that the operation accepts.

An example is a pull depth less than -1.

§

LockTimeout

A wait for the repository lock or the update lock that passed its limit.

The limit of the wait is the value of [core] lock-timeout-secs. With the value -1, a wait has no limit and does not give this error. The message names the repository lock for both locks. LockKind states the rules of the repository lock, and UpdateGuard states the rules of the update lock.

Fields

§secs: i64

The limit of the wait, in seconds.

§

ChecksumMismatch

Data whose computed checksum is not the expected checksum.

The expected checksum is the checksum that the caller of a write gives for the object. In a pull, it is also the advertised checksum of a static-delta superblock.

Fields

§expected: Checksum

The checksum that the caller or the advertisement gave.

§actual: Checksum

The checksum that this crate computed.

§

InsufficientFreeSpace

A staged object that makes the free space less than the reserve.

The keys min-free-space-percent and min-free-space-size of [core] set the reserve.

Fields

§shortfall: u64

The number of bytes of free space that the write needed in addition.

§

MutableTree(String)

A failure to build or serialize an in-memory tree.

The causes are:

  • an invalid entry name
  • a file name and a directory name that are the same
  • a directory with no dirmeta checksum
  • the removal of an absent entry
  • a committed subdirectory that is not loaded, with no repository to read it from
§

UnsupportedOverlayFeature(String)

An overlayfs feature in an upper directory that the merge cannot carry.

An entry with overlay.metacopy or overlay.redirect is not self-contained. The merge needs an overlay that has the feature off: metacopy=off and redirect_dir=off.

§

PathNotFound

A path with a component that is not present.

Fields

§path: String

The path of the absent component.

If a caller has one name and no path, the field holds the bare entry name. MutableTree::subtree is such a caller.

§

NotADirectory

A path component that must be a directory and is a file.

A symlink that resolves to a file also gives this error.

Fields

§path: String

The path of the component that is not a directory.

If a caller has one name and no path, the field holds the bare entry name. MutableTree::subtree is such a caller.

A symlink whose target does not resolve.

Fields

§path: String

The path of the symlink.

§target: String

The target that the symlink names.

§

SymlinkLoop

A path resolution that followed more symlinks than the depth cap.

The cap is 40 symlinks.

Fields

§path: String

The path of the symlink where the resolution stopped.

§

EntryExists

An entry at a path where an operation must create a new entry.

Fields

§path: String

The path of the entry.

§

Staging(String)

A failure of a staging-tree operation that no other variant names.

The causes are:

  • an outstanding file writer that blocks the operation, for example StagingTree::close
  • a read of a file at a path that holds a directory
  • a hardlink whose source resolves to a directory
  • a directory that a concurrent operation removed while the operation held its path
  • a path with no final component, or a path that ends in ..
  • a path component or a symlink target that is not valid UTF-8
  • a rename whose destination is under the moved entry
  • a load of a committed directory with no repository handle to read it
§

MergeConflict(String)

A conflict of a staging-tree merge that the merge options do not permit.

The conflicts are differing files, a file and a directory at one path, and differing directory metadata. Each one is a conflict only if allow_overwrite of the MergeOptions is off.

§

Checkout(String)

A checkout that cannot proceed.

The causes are:

  • a collision under OverwriteMode::None
  • a mismatch under UnionIdentical
  • a combination of options that a checkout does not accept
  • a partial commit
  • a whiteout that names no entry
  • a destination name that is not valid UTF-8
  • a failure to set an extended attribute
§

SubpathNotFound(PathBuf)

A checkout subpath that names no entry in the commit tree.

The payload is the value as the caller wrote it.

§

SubpathNotADirectory(PathBuf)

A checkout subpath that passes through an entry that is not a directory.

The payload is the value as the caller wrote it.

An entry that a checkout under require_hardlinks must copy.

The repository mode and the checkout mode give a copy of the entry. The payload is the name of the entry.

§

HardlinkAcrossDevices

A hardlink checkout into a directory on another file system.

A checkout under require_hardlinks cannot hardlink an entry into a directory on a file system other than the file system of the repository. The destination root gives this error, and so does each directory under it. A checkout of a single file or symlink does no such directory check. It gives this error if the link of that entry crosses a file system.

The fields hold the device number of each side.

Fields

§src: u64

The device number of the object store of the repository.

§dst: u64

The device number of the destination.

§

Tar(String)

A tar import or export that cannot proceed.

The causes are:

  • an entry type that a repository cannot store: a device node or a FIFO
  • an empty path, or a path with a .. component
  • a hardlink with no target in the archive
  • an xattr name that is not valid UTF-8
  • an export subpath that is absent or is not a directory

A failure to remove an entry of the source under CONSUME.

The fields hold the name of the entry and the reason of the failure.

Fields

§name: String

The name of the entry.

§reason: String

The reason of the failure, as the text of the OS error.

§

ReplaceDirWithFile(String)

A file from a tree source at a path where an earlier source put a directory.

The payload is the name of the entry.

§

ReplaceFileWithDir(String)

A directory from a tree source at a path where an earlier source put a file.

The payload is the name of the entry.

§

TarMissingParent(String)

A tar member whose parent directory is not in the tree.

A tar import gives this error if TarImportOptions::autocreate_parents is off. The payload is the name of the first absent ancestor.

§

Signature(String)

A failure of a signing engine, a key source, or a signature verification.

A signing engine gives this error for these inputs:

  • a key of the wrong length
  • a public key that is not a valid curve point
  • a malformed secret key
  • a signature blob that the engine refuses

An ostrya_sign::Error::Signature converts to this variant with the same message. Each variant of ostrya_sign::Error that the conversion does not name also converts to this variant.

This crate also builds this variant in these places:

  • the verification policy of a pull
  • the readers of keyrings and key files
  • the GPG key import and the gpg program that it runs
  • the signature verification of a static delta
§

Pull(String)

A pull that cannot proceed, or that refuses an object or a commit.

The causes are:

  • a remote that is not in the configuration, or that has no url and no pull-url
  • a pull of all refs with no configured branches, or in mirror mode with no summary on the remote
  • a pull of the refs of the remote key pull-branches with no summary on the remote, or with no ref of the summary that the key selects and no ref in the remote key branches
  • a commit whose ostree.ref-binding does not name the ref of the pull
  • a commit that is older than the commit that its ref holds
  • a content object whose mode the destination repository cannot store
  • a required static delta that is absent, or a delta whose superblock does not produce its target
  • a list of static deltas whose superblocks and detached metadata pass the 1 GiB limit of one discovery from a remote
  • a subpath that is not an absolute path, or too many subpaths
  • a signature verification with no remote to take the keys from
  • a client certificate with no client key, or a client key with no client certificate
§

Fetch(String)

A failure to set up or to carry out a fetch.

The causes include a mirror URL, a header, or a TLS configuration that the fetcher cannot use. They also include a transport failure that outlived the retries.

A fetch::Error::Fetch converts to this variant with the same message. Each variant of fetch::Error that the conversion does not name also converts to this variant. A pull also builds this variant.

§

HttpStatus

An unsuccessful HTTP status that ended a fetch.

A 404 means that the remote does not hold the object. A pull accepts a 404 as a normal answer for an optional object.

A fetch with mirrors and rounds reports the first definitive failure that it received. If it received no definitive failure, it reports the first retryable failure. If the reported failure is a status, it is this variant.

A fetch::Error::HttpStatus converts to this variant. The conversion drops the headers and the body of the response that the fetch error can carry.

Fields

§status: u16

The status of the response.

§url: String

The URL of the hop that answered with the status.

§

RedirectLimit

A redirect chain that reached the limit of max_redirects.

The response at the end of the chain named another URL to follow. Each attempt against one destination counts its own hops, so a repeated round counts again from the destination that the route named.

A fetch::Error::RedirectLimit converts to this variant.

Fields

§url: String

The URL of the last hop, whose Location the limit did not follow.

§hops: u32

The number of redirects that the attempt followed, which is the limit.

§

FetchTooLarge

A response that declared more bytes than the cap of the caller.

If a body grows past the cap while it streams, the read fails with the same FileTooLarge kind. The payload of that I/O error is a message, and it does not downcast to an error of this crate.

A fetch::Error::FetchTooLarge converts to this variant.

Fields

§limit: u64

The cap that the caller set on the request.

§

ContentEncoded

A response that declared a coding in Content-Encoding or Transfer-Encoding.

The body of such a response holds bytes other than the bytes that the remote stores.

A fetch::Error::ContentEncoded converts to this variant.

Fields

§url: String

The URL that answered.

§encoding: String

The coding that the response declared.

§

UploadInterrupted

An upload that failed after the fetcher gave its request to the connection.

The server can have received the whole request and acted on it, so the outcome is unknown. The fetcher does not send the request again.

A fetch::Error::UploadInterrupted converts to this variant.

Fields

§url: String

The URL that the request was sent to.

§message: String

The text that names what ended the upload.

§

InvalidRelations

A defective list of related commits, or attachments that are not complete.

These calls give this error:

  • Transaction::write_commit and Transaction::check_attachments, for an entry of CommitOptions::attachments with an empty name, for two entries with the same name, and for an attachment that is absent or partial. The calls check before the commit has a checksum, so commit is None.
  • Repo::commit_add_composefs_metadata, for a defective field 2 of the source commit: an entry with an empty name or with a checksum that is not 32 bytes, entries that are not sorted by name, two entries with the same name, and an attachment that is absent or partial. commit is the source commit.
  • Repo::read_commit_relations, for an entry with an empty name or with a checksum that is not 32 bytes, and for an ostrya.related value that is not a variant of type a(say). commit is the commit that the call reads.
  • Repo::write_commit_detached_metadata, and Transaction::commit for a dict that Transaction::set_commit_detached_metadata queued, for an ostrya.related entry of the dict with one of these defects. commit is the commit of the dict.
  • Repo::add_supplement and Transaction::add_supplement, for an empty name. commit is the commit that gets the supplement.
  • Repo::add_supplement, and Transaction::commit for an add that Transaction::add_supplement queued, for a stored ostrya.related value with one of these defects. commit is the commit that gets the supplement.
  • Repo::pull, Repo::pull_with_session, and Repo::pull_collection from a remote, for an entry of field 2 with an empty name or with a checksum that is not 32 bytes. Also for an attachment, at each level, that neither the remote, a localcache repository, nor the repository holds. commit is the commit that holds the entry. For an attachment, it is a commit of the lowest level that names the attachment, the commit with the lowest checksum of that level, as Repo::pull states in # Attachments.
  • Repo::pull_local, and Repo::pull_collection from a local repository, for an entry of field 2 with an empty name or with a checksum that is not 32 bytes. Also for an attachment, at each level, that neither a source nor the repository holds, that the first source that holds it marks partial, or that the repository held complete and no longer holds complete when the transaction opens. commit is the commit that holds the entry. For an attachment, it is the commit that first names the attachment.
  • Repo::push, Repo::push_over_stream, Repo::push_to_bucket, and Repo::export_stream, for an entry of field 2 with an empty name or with a checksum that is not 32 bytes, in a commit that the push or the export reads: a source commit, a commit of the parent chain that the push walks, a new commit of the export, or an attachment at each level. Also for an attachment, at each level, that the local repository does not hold or marks partial. commit is the commit that holds the entry. For an absent or a partial attachment, it is the commit that first names the attachment.
  • Repo::receive, Repo::receive_selected, Repo::receive_stream, Repo::receive_stream_to_commit, and ReceiveService::commit, for an entry of field 2 with an empty name or with a checksum that is not 32 bytes, in an attachment or a new commit that the repository holds complete. commit is that held commit.
  • Repo::apply_static_delta and Repo::apply_static_delta_offline, for an entry of field 2 of the target commit with an empty name or with a checksum that is not 32 bytes, and for an attachment that is absent or partial. commit is the target commit.

Repo::prune gives a RelationWarning with the same text in place of this error, and continues.

Fields

§commit: Option<Checksum>

The commit that holds the entries, or None for a commit that is not written yet.

§field: RelationField

The field that holds the entries.

§reason: String

The text that names the defect.

§

Remote(Error)

A failure of a session of the wire protocol of ostrya-remote.

The push, the receive side, and the pull over ssh use this protocol.

The causes are:

  • an error that the server side sent to the peer with its wire code
  • an Abort from the client (Aborted)
  • an error of the session stream
  • on the client side, a push request that the client refuses (InvalidInput)
  • with the s3 feature, an error response of an S3 server to a read of the bucket client in a pull

The variant is in every build.

§

StaticDeltaNotFound

A static delta from from to to that the repository does not hold.

No file resolves at its deltas/<fanout>/<rest> path. The message names the delta as the ostree command names it.

Fields

§from: Option<Checksum>

The source commit, or None for a delta from scratch.

§to: Checksum

The target commit.

§

ComposefsDigestMismatch

A composefs image whose fs-verity digest is not the value of the ostree.composefs.digest.v0 key of its commit.

Repo::add_composefs_supplement gives this error and writes nothing.

Fields

§commit: Checksum

The commit of the image.

§expected: [u8; 32]

The digest that the commit records.

§actual: [u8; 32]

The fs-verity digest of the image.

§

InvalidComposefsImage

A composefs image commit that a commit names and that has a defect.

Repo::open_composefs_image gives this error. It does not try the next source.

Fields

§commit: Checksum

The commit that names the image commit.

§relation: ComposefsImageSource

The field of commit that names the image commit.

§image: Checksum

The checksum of the image commit.

§defect: Box<ComposefsImageDefect>

The defect of the image commit. The box keeps the size of Error small.

§

MediaNotFound

No media repository on the mounted volumes, or in the directory that the caller gave in place of the mount table.

Repo::import_media gives this error.

Fields

§skipped: Vec<(PathBuf, MediaSkip)>

Each candidate that exists and that the media finder skipped, with the reason, in probe order.

§

AmbiguousMedia

More than one media repository on the mounted volumes.

Repo::import_media gives this error.

Fields

§paths: Vec<PathBuf>

The path of each media repository, in the order of the mount table.

§

BucketLocked

Available on crate feature s3 only.

The writer lock of a bucket repository that another writer holds.

The take of the lock found a lock. A take with no break of the lock wrote only the probe key. After a break of the lock, the lock that the break deleted stays deleted. bucket states the writer lock.

Fields

§address: String

The address of the repository, s3://BUCKET[/PREFIX].

§holder: Option<Box<LockHolder>>

The holder that the lock names, or None if the lock was gone at the read after the take. A new run can then take the lock.

§

BucketLockLost

Available on crate feature s3 only.

A writer lock of a bucket repository that another writer broke.

A check or a release of the lock found a lock with another id, a lock that names no id, or no lock. A writer that gets this error stops before its next change.

A release whose delete removed the lock, but whose answer did not arrive, sends the delete again. If another writer took the lock between the two requests, the release gives this error with the holder of the new lock, although the release removed the lock of this writer before the other writer took its own.

Fields

§address: String

The address of the repository, s3://BUCKET[/PREFIX].

§holder: Option<Box<LockHolder>>

The holder of the lock that the key holds, or None if the key holds no lock.

§

BucketNoExclusion

Available on crate feature s3 only.

An S3 server that writes over an object in spite of If-None-Match: *.

The writer lock gives no exclusion on such a server, so no writer runs on it. The probe of the take finds this before a request to the lock key, so the call wrote no lock, and a lock that the key holds does not change.

Fields

§address: String

The address of the repository, s3://BUCKET[/PREFIX].

§

BucketRepairIncomplete

Available on crate feature s3 only.

A repair of a bucket repository that failed after its first change.

BucketRepo::fsck with delete gives this error if a step of the repair fails after the check of the lock before its first write. The repair is incomplete: the bucket can hold a partial-commit marker of a commit whose bad objects are still in the bucket. A push of such a commit then uploads no object for them and deletes the marker. Run the fsck with delete again before a push.

Fields

§address: String

The address of the repository, s3://BUCKET[/PREFIX].

§report: Box<BucketFsckReport>

The report of the run: the findings, and each marker write and each delete that completed before the failure.

§error: Box<Error>

The failure of the repair.

§

BucketSummaryIncomplete

Available on crate feature s3 only.

A signed summary update of a bucket repository whose summary and summary.sig can fail to match.

BucketRepo::update_summary with a summary signer gives this error if the write of summary.sig fails after the write of summary, or if the write of summary fails with an unknown outcome. The bucket can then hold a summary.sig that does not cover its summary, or no summary.sig, and a pull that verifies the summary then refuses it. A summary update again with the same signers writes a matching pair. Before it gives this error, the update tries to release its lock, and drops an error of that release.

Fields

§address: String

The address of the repository, s3://BUCKET[/PREFIX].

§summary_written: bool

true if the server accepted the write of summary and the write of summary.sig failed. false if the write of summary failed with an unknown outcome: the HTTP client failed, or the last answer was 408, 429, or 5xx.

§report: Box<BucketSummaryReport>

The report of the update, as a success gives it, with the holder of a broken lock.

§error: Box<Error>

The failure of the write.

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, __formatter: &mut Formatter<'_>) -> Result

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

impl Error for Error

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

Replaced by Error::source.
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<Errno> for Error

Source§

fn from(errno: Errno) -> Error

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(err: Error) -> Error

Maps a signing-engine error to the variant of the same name.

A variant that this conversion does not name maps to Error::Signature with the message of the error.

Source§

impl From<Error> for Error

Source§

fn from(err: Error) -> Error

Maps a fetcher error to the variant of the same name.

The variant gets the same fields, so the message stays the same. A variant that this conversion does not name maps to Error::Fetch with the message of the error.

Source§

impl From<Error> for Error

Source§

fn from(err: Error) -> Error

Maps an error of this crate to the closest std::io::ErrorKind.

The I/O error holds the error as its payload, so its Display and its source chain stay. An Error::Io comes back unchanged.

A variant gets a specific kind only if the standard set names the condition. A symlink loop maps to Other, because ErrorKind::FilesystemLoop is unstable.

Three fetch failures get their own kind:

If a body grows past the cap while it streams, its read fails with the same FileTooLarge kind. The payload of that error is a message, so only the converted error downcasts to an error of this crate.

Source§

impl From<ParseRefError> for Error

Source§

fn from(err: ParseRefError) -> Error

Maps a ref that fails the ref-name rule to Error::InvalidRefspec with the text of the ref.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Forget for Error

§

impl Freeze for Error

§

impl Move for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin 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> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more