pub enum PeermergeError {
BadArgument {
context: String,
},
AutomergeError {
context: Option<String>,
source: AutomergeError,
},
Disconnected {
context: String,
},
NotWritable,
InvalidOperation {
context: String,
},
SecurityIssue {
context: String,
},
IO {
context: Option<String>,
source: Error,
},
}Expand description
Common error type for the peermerge interface
Variants§
BadArgument
Bad argument
AutomergeError
Automerge error
Disconnected
Disconnected
NotWritable
Not writable
InvalidOperation
Invalid operation
SecurityIssue
Security issue
IO
Unexpected IO error occured
Trait Implementations§
Source§impl Debug for PeermergeError
impl Debug for PeermergeError
Source§impl Display for PeermergeError
impl Display for PeermergeError
Source§impl Error for PeermergeError
impl Error for PeermergeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<AutomergeError> for PeermergeError
impl From<AutomergeError> for PeermergeError
Source§fn from(err: AutomergeError) -> Self
fn from(err: AutomergeError) -> Self
Converts to this type from the input type.
Source§impl<T> From<SendError<T>> for PeermergeError
impl<T> From<SendError<T>> for PeermergeError
Source§fn from(err: ChannelSendError<T>) -> Self
fn from(err: ChannelSendError<T>) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for PeermergeError
impl From<EncodingError> for PeermergeError
Source§fn from(err: EncodingError) -> Self
fn from(err: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for PeermergeError
impl From<Error> for PeermergeError
Source§impl From<HypercoreError> for PeermergeError
By default, all hypercore errors are unexpected operation failures, that are passed through
as InvalidOperation.
impl From<HypercoreError> for PeermergeError
By default, all hypercore errors are unexpected operation failures, that are passed through as InvalidOperation.
Source§fn from(err: HypercoreError) -> Self
fn from(err: HypercoreError) -> Self
Converts to this type from the input type.
Source§impl<T> From<TrySendError<T>> for PeermergeError
impl<T> From<TrySendError<T>> for PeermergeError
Source§fn from(err: TrySendError<T>) -> Self
fn from(err: TrySendError<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PeermergeError
impl !RefUnwindSafe for PeermergeError
impl Send for PeermergeError
impl Sync for PeermergeError
impl Unpin for PeermergeError
impl !UnwindSafe for PeermergeError
Blanket Implementations§
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<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace carried by this failure, if it
carries one. Read moreSource§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more