Skip to main content

CliError

Enum CliError 

Source
#[non_exhaustive]
pub enum CliError {
Show 109 variants Import(String), NoThumbnail(String), Exists(PathBuf), NotInLibrary, NoLibraryIn(PathBuf), NoAccess(PathBuf, Error), NoDefaultLibrary(PathBuf), RelativeDefault(PathBuf), Unfinished(PathBuf), IsCopy(PathBuf), NoSecretsInCopies, NoCopy(PathBuf), SeveralCopies(PathBuf), CopiedHere(PathBuf), NoJournal(PathBuf), UncleanRemoval(PathBuf), InLibraryData(PathBuf), NoCurrentFolder(Error), Languages(ParseLanguagesError), NoForms, OneAlready { entity: String, into: String, }, NothingMerged(String), WhichMerged { entity: String, candidates: String, }, NotMergedInto { entity: String, other: String, }, NoHistory(String), Moment(String), NotYet { entity: String, when: String, }, PassphrasesDiffer, Stale(PathBuf), FilesFailed(usize), NotFetched { name: String, holders: Vec<String>, }, NotGiven { name: String, holders: Vec<String>, }, SyncsFailed(usize), NotAnswered(String), NotAnAiAgent, UnknownAiClient(String), NoTerminal, ValuesDiffer, EmptyValue, SecretField(FieldName), SecretGiven(FieldName), SecretHistory(FieldName), SecretFolder(PathBuf), SecretFileCheckout(String), NotSecret(FieldName), Generator(GeneratorError), OneTime(OneTimeError), Clipboard(ClipboardError), RecipeWithoutGenerate, GeneratedOneTimeCode(FieldName), NoRule(String), WhereTo, NoSecrets, NoSecretValue { entity: String, field: FieldName, }, EmptyPassphrase, PassphraseFile { path: PathBuf, error: Error, }, PassphraseFileOpen(PathBuf), AtLoginPassphrase, NoStateFolder, NoSyncProgram, NoKeystore, Keystore(NodeError), NoKeystoreToProtect, KeystoreToProtect(NodeError), Name(String), StandardName { name: String, what: &'static str, }, Field(String), Kind { kind: String, kinds: String, }, Flag(String), Flags(String), NoType(TypeName), AmbiguousType { name: String, candidates: String, }, NoField { field: String, types: String, }, AmbiguousField { field: String, candidates: String, }, TypeSet, Assignment(String), Unsound(usize), UnsoundExport(usize), Unconfirmed, UnconfirmedMove, UnconfirmedStart, NoGitCommit(PathBuf), NotInTree(PathBuf), NoTreeHere(PathBuf), NoLibraryForTree(PathBuf), BadPointer { file: PathBuf, why: String, }, StrayPointer { file: PathBuf, library: PathBuf, }, ThroughPointer(PathBuf), PointerInTheWay(PathBuf), PointerNotWritten { file: PathBuf, error: Error, }, PointerNotTakenAway { file: PathBuf, error: Error, }, NoAccountName, NoSuchCommand { verb: &'static str, instead: &'static str, }, RevertTakesRevision(String), UnconfirmedRevoke, NewSpacesElsewhere(String), NotARecoveryCode, StillUnlocks, UnknownRecoveryCode, UnconfirmedAccept, UnconfirmedLeave, UnconfirmedRemove, UnconfirmedClaim, UnconfirmedInvite, SetAndCleared(FieldName), Value { field: FieldName, expected: &'static str, }, Ambiguous { reference: String, count: usize, candidates: String, }, Node(NodeError), Io(Error),
}
Expand description

Why a command failed.

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.
§

Import(String)

An archive to import could not be read, or held nothing to import.

§

NoThumbnail(String)

A file has no thumbnail, as its device could not read its format, or it is no picture.

§

Exists(PathBuf)

Something is where a file would be written, which replaces nothing.

§

NotInLibrary

No library was given, and the current folder is in none.

§

NoLibraryIn(PathBuf)

The folder given as the library holds none.

§

NoAccess(PathBuf, Error)

The system lets nib not read a folder where a library would be, as macOS does with a removable drive until the person allows the terminal to reach it.

§

NoDefaultLibrary(PathBuf)

NIBKEEP_LIBRARY names a folder that holds no library.

§

RelativeDefault(PathBuf)

NIBKEEP_LIBRARY names a folder relative to the current one.

§

Unfinished(PathBuf)

A library’s .nib holds what is left of starting it, in this replica’s folder.

§

IsCopy(PathBuf)

A library’s .nib holds only copies of replicas made elsewhere, which are never used as the devices they were (technical design: copies of a replica).

§

NoSecretsInCopies

nib secret from-copy found no secrets keys in the copies, or the person left the passphrase of the copy’s secrets empty.

§

NoCopy(PathBuf)

nib recovery from-copy finds no copy in the library’s .nib.

§

SeveralCopies(PathBuf)

nib recovery from-copy finds several copies, of which it would not know which to use.

§

CopiedHere(PathBuf)

A library’s .nib holds only copies of replicas made elsewhere, so a new library is not started there.

§

NoJournal(PathBuf)

A library would be on a drive without a journal, which the person did not allow (technical design: drives without a journal).

§

UncleanRemoval(PathBuf)

The drive of a library without a journal was removed, or lost its power, while the library was open.

§

InLibraryData(PathBuf)

A library would be started in what another library keeps.

§

NoCurrentFolder(Error)

The current folder cannot be found.

§

Languages(ParseLanguagesError)

Ranked languages that cannot be read.

§

NoForms

--form without forms to add or remove.

§

OneAlready

Entities to merge that are one already.

Fields

§entity: String

The entity, as it was given.

§into: String

The entity to merge it into, as it was given.

§

NothingMerged(String)

A merge to undo, of an entity that nothing was merged into.

§

WhichMerged

A merge to undo, of one of several entities merged into another, not said which.

Fields

§entity: String

The entity, as it was given.

§candidates: String

The entities merged into it.

§

NotMergedInto

A merge to undo, of an entity that was not merged into the one given.

Fields

§entity: String

The entity, as it was given.

§other: String

The entity to set apart, as it was given.

§

NoHistory(String)

A field that an entity never had, in nib history.

§

Moment(String)

A moment that cannot be used.

§

NotYet

An entity shown as recorded by a moment, when the library had no record of it yet.

Fields

§entity: String

The entity, as it was given.

§when: String

The moment, for people.

§

PassphrasesDiffer

The passphrase and its confirmation differ.

§

Stale(PathBuf)

The edits of a checkout’s copy, made to a version that is no longer the file’s own.

§

FilesFailed(usize)

Files that could not be added, while the others were.

§

NotFetched

A file to check out that this device lacks, which none of the devices that hold it gave, as none was found on the network.

Fields

§name: String

The file.

§holders: Vec<String>

The devices that hold it, as their accounts say.

§

NotGiven

A file to check out that this device lacks, which the devices that hold it, as their accounts say, did not give, though a sync reached them.

Fields

§name: String

The file.

§holders: Vec<String>

The devices that a sync reached.

§

SyncsFailed(usize)

Devices that could not be synced with, while the others were.

§

NotAnswered(String)

The program that syncs this device did not answer nib sync in time.

§

NotAnAiAgent

nib mcp on a library that neither allows AI agents nor is an AI agent’s.

§

UnknownAiClient(String)

--client names no AI client that nib mcp enable knows.

§

NoTerminal

nib mcp on a library whose keys need a passphrase, without a file that holds it.

§

ValuesDiffer

A secret value and its confirmation differ.

§

EmptyValue

A secret value to set is empty.

§

SecretField(FieldName)

A secret field, in a command that takes no secret values.

§

SecretGiven(FieldName)

A value of a secret field given on the command line, which shells keep.

§

SecretHistory(FieldName)

The history of a secret field, which nib history leaves out.

§

SecretFolder(PathBuf)

A folder given to nib file add --secret, which takes files one by one.

§

SecretFileCheckout(String)

A secret file to check out, of which NibKeep records no copies.

§

NotSecret(FieldName)

A field that is not secret, in nib secret.

§

Generator(GeneratorError)

A password that cannot be generated as asked.

§

OneTime(OneTimeError)

A secret of one-time codes that makes none.

§

Clipboard(ClipboardError)

The clipboard failed.

§

RecipeWithoutGenerate

Options for a generated password, without –generate.

§

GeneratedOneTimeCode(FieldName)

A generated secret of one-time codes, which only the site can give.

§

NoRule(String)

A rule that no number or ID names.

§

WhereTo

A rule to move, without saying where.

§

NoSecrets

Secrets to unlock, in a library that has none.

§

NoSecretValue

A secret field without values, in nib secret show.

Fields

§entity: String

The entity, as it was given.

§field: FieldName

The field.

§

EmptyPassphrase

The passphrase is empty.

§

PassphraseFile

The file that gives the passphrase cannot be read.

Fields

§path: PathBuf

The file.

§error: Error

Why not.

§

PassphraseFileOpen(PathBuf)

The file that gives the passphrase can be read by others.

§

AtLoginPassphrase

Syncing from login, for a library whose keys a passphrase protects.

§

NoStateFolder

No home folder to keep the list of libraries synced from login in.

§

NoSyncProgram

No nibkeep-sync beside nib.

§

NoKeystore

The library’s keys are in the platform’s keystore, which is not there.

§

Keystore(NodeError)

The platform’s keystore failed while a library was started.

§

NoKeystoreToProtect

No keystore to protect a library’s keys or its secrets with.

§

KeystoreToProtect(NodeError)

The platform’s keystore failed while protecting a library’s keys or its secrets.

§

Name(String)

A name is not valid.

§

StandardName

A name that a person gives is a standard one, which only the standard vocabulary gives, so that a later version’s standard field never meets another kind of it.

Fields

§name: String

The name given.

§what: &'static str

What it names: a type or a field.

§

Field(String)

A field is not given as name:kind.

§

Kind

There is no such kind of value.

Fields

§kind: String

The kind given.

§kinds: String

The kinds there are.

§

Flag(String)

There is no such flag for a field.

§

Flags(String)

A field’s flags contradict each other, or repeat.

§

NoType(TypeName)

There is no such type.

§

AmbiguousType

Several types end in the name.

Fields

§name: String

The name as given.

§candidates: String

The types it could be.

§

NoField

The types have no such field.

Fields

§field: String

The field as given.

§types: String

The types.

§

AmbiguousField

Several fields of the types end in the name.

Fields

§field: String

The field as given.

§candidates: String

The fields it could be.

§

TypeSet

Types set, or cleared, rather than given or taken away one by one.

§

Assignment(String)

A value is not given as field=value.

§

Unsound(usize)

Checking the library found something wrong.

§

UnsoundExport(usize)

An export that differs from the library, with how many problems were found.

§

Unconfirmed

A purge was not confirmed.

§

UnconfirmedMove

A move of a folder or a list, with all it holds, was not confirmed.

§

UnconfirmedStart

Starting a tree was not confirmed.

§

NoGitCommit(PathBuf)

Pinning a folder that holds no Git repository with a commit.

§

NotInTree(PathBuf)

A tree’s command run outside every tree’s folder on this device.

§

NoTreeHere(PathBuf)

A command that reads a tree’s history run outside every tree’s folder on this device, with no tree named.

§

NoLibraryForTree(PathBuf)

nib init given a folder, a message or –yes, to make a tree, where neither that folder nor the current one is in a library.

§

BadPointer

A .nib file in a folder that names no library nib may open.

Fields

§file: PathBuf

The file.

§why: String

What is wrong with it.

§

StrayPointer

A .nib file that names a library which keeps no tree in that folder on this device, as a copy of a tree’s folder would.

Fields

§file: PathBuf

The file.

§library: PathBuf

The library’s folder.

§

ThroughPointer(PathBuf)

A command about the library’s place, run where only a tree’s .nib file names the library.

§

PointerInTheWay(PathBuf)

Something other than a file where the .nib file of a tree outside the library’s folder goes.

§

PointerNotWritten

The .nib file of a tree outside the library’s folder could not be written.

Fields

§file: PathBuf

The file.

§error: Error

Why not.

§

PointerNotTakenAway

The .nib file of a tree inside the library’s folder, which would take over the commands there, could not be deleted.

Fields

§file: PathBuf

The file.

§error: Error

Why not.

§

NoAccountName

nib init without –name, where the system names no account to name the user after.

§

NoSuchCommand

A command of other version control systems that nib does not have.

Fields

§verb: &'static str

The command.

§instead: &'static str

What to do instead.

§

RevertTakesRevision(String)

nib revert given a path, as Mercurial’s revert takes, rather than a revision.

§

UnconfirmedRevoke

A revocation was not confirmed.

§

NewSpacesElsewhere(String)

Whether another device takes new spaces, which only that device says.

§

NotARecoveryCode

What was typed was no recovery code, each time it was asked for.

§

StillUnlocks

A recovery in place of a library here that still unlocks with the keystore, which it would only revoke.

§

UnknownRecoveryCode

The recovery code typed is none that the library names.

§

UnconfirmedAccept

Accepting changes that were set aside was not confirmed.

§

UnconfirmedLeave

Leaving a space was not confirmed.

§

UnconfirmedRemove

Removing a member was not confirmed.

§

UnconfirmedClaim

Claiming the admin role was not confirmed.

§

UnconfirmedInvite

An invitation without –yes, where there is no terminal to ask whether to add whoever asks.

§

SetAndCleared(FieldName)

A field is set and cleared in one edit.

§

Value

A value cannot be read as its field’s kind says.

Fields

§field: FieldName

The field.

§expected: &'static str

What it takes.

§

Ambiguous

A name or a prefix of an ID that several entities have.

Fields

§reference: String

The name or prefix, as it was given.

§count: usize

How many entities have it.

§candidates: String

Some of them, one per line, by short ID, name and types.

§

Node(NodeError)

The engine failed.

§

Io(Error)

Reading or writing failed.

Trait Implementations§

Source§

impl Debug for CliError

Source§

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

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

impl Display for CliError

Source§

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

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

impl Error for CliError

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<ClipboardError> for CliError

Source§

fn from(source: ClipboardError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CliError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GeneratorError> for CliError

Source§

fn from(source: GeneratorError) -> Self

Converts to this type from the input type.
Source§

impl From<NodeError> for CliError

Source§

fn from(source: NodeError) -> Self

Converts to this type from the input type.
Source§

impl From<OneTimeError> for CliError

Source§

fn from(source: OneTimeError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseLanguagesError> for CliError

Source§

fn from(source: ParseLanguagesError) -> Self

Converts to this type from the input type.
Source§

impl From<PointerError> for CliError

What is wrong with a .nib file, as nib says it.

Source§

fn from(error: PointerError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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<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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> 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 = !

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<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