pub enum StellarClientError {
OutsideRetentionWindow {
rpc_code: i64,
rpc_message: String,
ledger_info: String,
context: Box<ErrorContext>,
},
RpcError(Box<ErrorContext>),
ResponseParseError(Box<ErrorContext>),
InvalidInput(Box<ErrorContext>),
UnexpectedResponseStructure(Box<ErrorContext>),
}Expand description
Stellar client error type
Variants§
OutsideRetentionWindow
Requested data is outside of the Stellar RPC retention window
RpcError(Box<ErrorContext>)
Failure in making an RPC request
ResponseParseError(Box<ErrorContext>)
Failure in parsing the Stellar RPC response
InvalidInput(Box<ErrorContext>)
Invalid input provided to the Stellar client
UnexpectedResponseStructure(Box<ErrorContext>)
The response from the Stellar RPC does not match the expected format.
Implementations§
Source§impl StellarClientError
impl StellarClientError
pub fn outside_retention_window( rpc_code: i64, rpc_message: String, ledger_info: String, source: Option<Box<dyn Error + Send + Sync + 'static>>, metadata: Option<HashMap<String, String>>, ) -> Self
pub fn rpc_error( message: impl Into<String>, source: Option<Box<dyn Error + Send + Sync + 'static>>, metadata: Option<HashMap<String, String>>, ) -> Self
pub fn response_parse_error( message: impl Into<String>, source: Option<Box<dyn Error + Send + Sync + 'static>>, metadata: Option<HashMap<String, String>>, ) -> Self
pub fn invalid_input( msg: impl Into<String>, source: Option<Box<dyn Error + Send + Sync + 'static>>, metadata: Option<HashMap<String, String>>, ) -> Self
pub fn unexpected_response_structure( msg: impl Into<String>, source: Option<Box<dyn Error + Send + Sync + 'static>>, metadata: Option<HashMap<String, String>>, ) -> Self
Trait Implementations§
Source§impl Debug for StellarClientError
impl Debug for StellarClientError
Source§impl Display for StellarClientError
impl Display for StellarClientError
Source§impl Error for StellarClientError
impl Error for StellarClientError
1.30.0 · 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 TraceableError for StellarClientError
impl TraceableError for StellarClientError
Auto Trait Implementations§
impl Freeze for StellarClientError
impl !RefUnwindSafe for StellarClientError
impl Send for StellarClientError
impl Sync for StellarClientError
impl Unpin for StellarClientError
impl !UnwindSafe for StellarClientError
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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> 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