pub enum Error {
Io(Error),
Http(Box<dyn StdError + Send + Sync>),
Url(ParseError),
Jiff(Error),
Decode(DecodeError),
Encode(EncodeError),
Finalization(FinalizationError),
EmptyInput,
QuorumNotReached {
required: usize,
received: usize,
},
DigestMismatch {
expected: Box<[u8]>,
actual: Box<[u8]>,
},
Unsupported(&'static str),
UnsupportedChain(ChainId),
}Expand description
Error type for the SDK, encompassing various error scenarios that can occur during operations.
Variants§
Io(Error)
Error during an I/O operation, such as reading or writing files.
Http(Box<dyn StdError + Send + Sync>)
Error during an HTTP request, such as a network failure or non-success status code.
Url(ParseError)
Error parsing a URL, such as a calendar endpoint.
Jiff(Error)
Error during time-related operations, such as calculating timestamps or durations.
Decode(DecodeError)
Error happened during decoding of a proof.
Encode(EncodeError)
Error happened during encoding of a proof.
Finalization(FinalizationError)
Error indicating that finalization of a timestamp failed due to conflicting inputs.
EmptyInput
Error indicating that the input provided was empty when it was expected to contain data.
QuorumNotReached
Error indicating that a quorum of responses was not reached from the calendars.
Fields
DigestMismatch
Error indicating that a digest mismatch occurred, with expected and actual digest values.
Unsupported(&'static str)
Error indicating that an unsupported feature was encountered, with a message describing the unsupported feature.
UnsupportedChain(ChainId)
Error indicating that an unsupported chain ID was encountered.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for Error
impl From<EncodeError> for Error
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Source§impl From<FinalizationError> for Error
impl From<FinalizationError> for Error
Source§fn from(source: FinalizationError) -> Self
fn from(source: FinalizationError) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.