pub enum AuthError {
Status {
source: Status,
},
Api {
code: i32,
description: String,
},
EmptyToken,
InvalidMetadata {
source: InvalidMetadataValue,
},
}Expand description
Errors from authentication operations.
Variants§
Status
gRPC status error from a request.
Api
Anytype API returned an error response.
EmptyToken
Create session returned an empty token.
InvalidMetadata
Invalid metadata value for auth token.
Fields
§
source: InvalidMetadataValueTrait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for AuthError
impl ErrorCompat for AuthError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<AuthError> for AnytypeGrpcError
impl From<AuthError> for AnytypeGrpcError
Source§impl From<AuthError> for BackupError
impl From<AuthError> for BackupError
Source§impl From<InvalidMetadataValue> for AuthError
impl From<InvalidMetadataValue> for AuthError
Source§fn from(source: InvalidMetadataValue) -> Self
fn from(source: InvalidMetadataValue) -> Self
Converts to this type from the input type.
Source§impl IntoError<AuthError> for EmptyTokenSnafu
impl IntoError<AuthError> for EmptyTokenSnafu
Source§impl IntoError<AuthError> for InvalidMetadataSnafu
impl IntoError<AuthError> for InvalidMetadataSnafu
Source§type Source = InvalidMetadataValue
type Source = InvalidMetadataValue
The underlying error
Source§fn into_error(self, error: Self::Source) -> AuthError
fn into_error(self, error: Self::Source) -> AuthError
Combine the information to produce the error
Auto Trait Implementations§
impl Freeze for AuthError
impl !RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnsafeUnpin for AuthError
impl !UnwindSafe for AuthError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request