#[non_exhaustive]pub enum FetchError {
Rpc(Error),
InvalidInput(String),
AccountNotFound(Pubkey),
AccountDecode(String),
}Expand description
Errors produced by I/O-bound fetch functions.
Fetch-layer code (anything in crate::fetch::* or
crate::token::account_state) returns this. Wraps the underlying
solana-client errors via anyhow so the plan layer never sees them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Rpc(Error)
An underlying RPC call failed.
InvalidInput(String)
Caller-supplied fetch input or the target resource is not valid for this operation (for example, an unsupported pool type).
AccountNotFound(Pubkey)
get_account / get_multiple_accounts returned None for an
address we expected to exist.
AccountDecode(String)
Borsh / SPL deserialization of an account’s data field failed.
Trait Implementations§
Source§impl Debug for FetchError
impl Debug for FetchError
Source§impl Display for FetchError
impl Display for FetchError
Source§impl Error for FetchError
impl Error for FetchError
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<Error> for FetchError
impl From<Error> for FetchError
Source§impl From<FetchError> for OrchestrateError
impl From<FetchError> for OrchestrateError
Source§fn from(source: FetchError) -> Self
fn from(source: FetchError) -> Self
Source§impl From<TokenError> for FetchError
Errors produced by orchestrate functions.
impl From<TokenError> for FetchError
Errors produced by orchestrate functions.
Orchestrate-layer code (anything in crate::orchestrate::*) returns
this. It is the only layer where PlanError, FetchError, and
transaction-send errors can meet via ? propagation.
The variants carry an explicit "<layer> layer failed:" prefix in
their Display impl rather than using #[error(transparent)]. This
trades one redundant word in the error message for the ability to
grep "fetch layer" log scans and tell exactly which layer surfaced
the failure — which is the entire selling point of having three
distinct error types in the first place.
Source§fn from(err: TokenError) -> Self
fn from(err: TokenError) -> Self
Auto Trait Implementations§
impl Freeze for FetchError
impl RefUnwindSafe for FetchError
impl Send for FetchError
impl Sync for FetchError
impl Unpin for FetchError
impl UnsafeUnpin for FetchError
impl UnwindSafe for FetchError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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