pub enum SealMediumError<E: Error> {
MediumAccessError(E),
PublicationNotSupported,
}
Expand description
Error returned by SealProtocol
and SealProtocolAsync
functions related
to work with publication id (SealProtocol::PublicationId
). Required
since not all implementation of SealProtocol
may define publication
identifier, and the traits provide default implementation for these
functions always returning SealMediumError::PublicationNotSupported
. If
the implementation would like to provide custom implementation, it may embed
standard error related to SealProtocol
operations within
SealMediumError::MediumAccessError
case; the type of MediumAccessError
is defined through generic argument to SealMediumError
.
Variants§
MediumAccessError(E)
Can’t access the publication medium
PublicationNotSupported
Publication id is not supported
Trait Implementations§
source§impl<E: Clone + Error> Clone for SealMediumError<E>
impl<E: Clone + Error> Clone for SealMediumError<E>
source§fn clone(&self) -> SealMediumError<E>
fn clone(&self) -> SealMediumError<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E: Error> Display for SealMediumError<E>
impl<E: Error> Display for SealMediumError<E>
source§impl<E: Error> Error for SealMediumError<E>
impl<E: Error> Error for SealMediumError<E>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<E: Error> From<E> for SealMediumError<E>
impl<E: Error> From<E> for SealMediumError<E>
source§impl<E: Error> From<SealMediumError<E>> for String
impl<E: Error> From<SealMediumError<E>> for String
source§fn from(err: SealMediumError<E>) -> Self
fn from(err: SealMediumError<E>) -> Self
Converts to this type from the input type.
impl<E: Copy + Error> Copy for SealMediumError<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for SealMediumError<E>where
E: RefUnwindSafe,
impl<E> Send for SealMediumError<E>where
E: Send,
impl<E> Sync for SealMediumError<E>where
E: Sync,
impl<E> Unpin for SealMediumError<E>where
E: Unpin,
impl<E> UnwindSafe for SealMediumError<E>where
E: UnwindSafe,
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