Enum sos_net::client::Error

source ·
pub enum Error {
Show 51 variants NoCache, NoArchive, NoOpenFolder, NoSecretId, NotFileContent, AlreadyArchived, NotArchived, NotDirectory(PathBuf), NotFile(PathBuf), NoDefaultFolder, NotContact, NoContactsFolder, PemEncoding, InvalidProvider(String), FileExists(PathBuf), VaultUnlockFail, ResponseCode(u16), RootHashMismatch(CommitHash, CommitHash), ServerProof, CacheNotAvailable(Uuid), ConflictBehind { summary: Summary, local: (CommitHash, usize), remote: (CommitHash, usize), events: Vec<WriteEvent<'static>>, }, Conflict { summary: Summary, local: (CommitHash, usize), remote: (CommitHash, usize), }, NoRootCommit, NoReturnValue, NoSession, InvalidSession, NotAuthorized, NoOpenVault, SecretNotFound(SecretId), Boxed(Box<dyn Error + Send + Sync>), Node(Error), ParseInt(ParseIntError), ToStr(ToStrError), Io(Error), Json(Error), TryFromSlice(TryFromSliceError), Core(Error), Http(Error), UrlParse(ParseError), Utf8(Utf8Error), Base58Decode(Error), HttpStatus(InvalidStatusCode), WebSocket(Error), Address(Error), Uuid(Error), Hex(FromHexError), Peer(Error), Migrate(Error), Vcard(Error), Mpc(Error), Snow(Error),
}
Available on crate feature client only.
Expand description

Errors generated by the client module.

Variants§

§

NoCache

Error generated if we could not determine a cache directory.

§

NoArchive

Error generated when an archive folder is not available.

§

NoOpenFolder

Error generated when an open folder is expected.

§

NoSecretId

Error generated when secret data does not have an identifier but an existing secret is expected.

§

NotFileContent

Error generated when a file secret is expected.

§

AlreadyArchived

Error generated when attempting to archive a secret that is already archived.

§

NotArchived

Error generated when attempting to unarchive a secret that is not archived.

§

NotDirectory(PathBuf)

Error generated when a path is not a directory.

§

NotFile(PathBuf)

Error generated when a path is not a file.

§

NoDefaultFolder

Error generated when no default folder is available.

§

NotContact

Available on crate feature contacts only.

Error generated when a secret is not a contact secret.

§

NoContactsFolder

Available on crate feature contacts only.

Error generated when a contacts folder is not available.

§

PemEncoding

Error generated when a PEM-encoded certificate is invalid.

§

InvalidProvider(String)

Error generated when a provider is not valid.

§

FileExists(PathBuf)

Error generated when a file already exists.

§

VaultUnlockFail

Error generated when unlocking a vault failed.

§

ResponseCode(u16)

Error generated when an unexpected response code is received.

§

RootHashMismatch(CommitHash, CommitHash)

Error generated when root commit hashes do not match.

§

ServerProof

Error generated if a server failed to send the expected commit proof header.

§

CacheNotAvailable(Uuid)

Error generated attempting to access a vault that is not available.

§

ConflictBehind

Fields

§summary: Summary

Summary of the vault that triggered the conflict.

§local: (CommitHash, usize)

Commit hash of the local event log.

§remote: (CommitHash, usize)

Commit hash of the remote event log.

§events: Vec<WriteEvent<'static>>

Events that can be applied after a pull.

Error generated when a conflict is detected where the local
is behind the remote.

Pulling from remote and applying changes afterwards should resolve the conflict.

§

Conflict

Fields

§summary: Summary

Summary of the vault that triggered the conflict.

§local: (CommitHash, usize)

Commit hash of the local event log.

§remote: (CommitHash, usize)

Commit hash of the remote event log.

Error generated when a conflict is detected that may be resolved by the user.

§

NoRootCommit

Error generated when a commit tree is expected to have a root.

§

NoReturnValue

Error generated when a return value is expected from a RPC call but the response did not have a result.

§

NoSession

Error generated when a session has no been set.

§

InvalidSession

Error generated when a session has no been set.

§

NotAuthorized

Error generated when a client receives an unauthorized response.

§

NoOpenVault

Error generated attempting to make changes to the current vault but no vault is open.

§

SecretNotFound(SecretId)

Error generated when a secret could not be found.

§

Boxed(Box<dyn Error + Send + Sync>)

Generic boxed error.

§

Node(Error)

Error generated by the main node library.

§

ParseInt(ParseIntError)

Error generated parsing to an integer.

§

ToStr(ToStrError)

Error generated converting a header to a string.

§

Io(Error)

Error generated by the io module.

§

Json(Error)

Error generated by the JSON library.

§

TryFromSlice(TryFromSliceError)

Error generated attempting to convert from a slice.

§

Core(Error)

Error generated by the core library.

§

Http(Error)

Error generated by the HTTP request library.

§

UrlParse(ParseError)

Error generated attempting to parse a URL.

§

Utf8(Utf8Error)

Error generated attempting to convert to a UTF-8 string.

§

Base58Decode(Error)

Error generated decoding a base58 string.

§

HttpStatus(InvalidStatusCode)

Error generated converting an HTTP status code.

§

WebSocket(Error)

Available on non-WebAssembly only.

Error generated by the websocket client.

§

Address(Error)

Error generated by the address library.

§

Uuid(Error)

Error generated when converting to a UUID.

§

Hex(FromHexError)

Error generated when parsing from hex.

§

Peer(Error)

Available on crate feature peer and non-WebAssembly only.

Error generated by the peer library.

§

Migrate(Error)

Available on crate feature migrate only.

Error generated by the migrate library.

§

Vcard(Error)

Available on crate feature contacts only.

Error generated by the vcard library.

§

Mpc(Error)

Error generated by the MPC library.

§

Snow(Error)

Error generated by the noise library.

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

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<Box<dyn Error + Sync + Send>> for Error

source§

fn from(source: Box<dyn Error + Send + Sync>) -> 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(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(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(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(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<FromHexError> for Error

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<InvalidStatusCode> for Error

source§

fn from(source: InvalidStatusCode) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for Error

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
source§

impl From<ParseIntError> for Error

source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
source§

impl From<ToStrError> for Error

source§

fn from(source: ToStrError) -> Self

Converts to this type from the input type.
source§

impl From<TryFromSliceError> for Error

source§

fn from(source: TryFromSliceError) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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

§

type Output = T

Should always be Self
source§

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

source§

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

§

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

§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

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