pub enum Error {
Show 17 variants
SolanaUtils(Error),
AnchorLang(Box<Error>),
Anchor(AnchorError),
Model(Error),
Base64Decode(DecodeError),
Bincode(Error),
Custom(String),
Transport(String),
MarketGraph(MarketGraphError),
ParsePubkey(ParsePubkeyError),
PubsubClosed,
NotFound,
Decode(DecodeError),
Programs(Error),
Reqwest(Error),
Json(Error),
MarketClosed(String),
}Expand description
SDK Error.
Variants§
SolanaUtils(Error)
Error from [gmsol-solana-utils].
AnchorLang(Box<Error>)
Anchor Lang Error.
Anchor(AnchorError)
Anchor Error.
Model(Error)
Model Error.
Base64Decode(DecodeError)
Base64 decode error.
Bincode(Error)
Available on crate feature
bincode only.Bincode error.
Custom(String)
Custom error.
Transport(String)
Transport error.
MarketGraph(MarketGraphError)
Available on crate feature
market-graph only.Market Graph Errors
ParsePubkey(ParsePubkeyError)
Parse Pubkey Error.
PubsubClosed
Available on crate feature
client only.Pubsub client closed.
NotFound
Not found error.
Decode(DecodeError)
Available on crate feature
decode only.Decode error.
Programs(Error)
Error from gmsol_programs.
Reqwest(Error)
Available on crate feature
reqwest only.Reqwest error.
Json(Error)
Available on crate feature
serde_json only.Json error.
MarketClosed(String)
Market closed error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn anchor_error_code(&self) -> Option<u32>
pub fn anchor_error_code(&self) -> Option<u32>
Anchor Error Code.
Sourcepub fn market_closed(msg: impl ToString) -> Self
pub fn market_closed(msg: impl ToString) -> Self
Create a MarketClosed error.
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)>
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<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(value: AnchorLangError) -> Self
fn from(value: AnchorLangError) -> Self
Converts to this type from the input type.
Source§impl From<MarketGraphError> for Error
impl From<MarketGraphError> for Error
Source§fn from(source: MarketGraphError) -> Self
fn from(source: MarketGraphError) -> Self
Converts to this type from the input type.
Source§impl From<ParsePubkeyError> for Error
impl From<ParsePubkeyError> for Error
Source§fn from(source: ParsePubkeyError) -> Self
fn from(source: ParsePubkeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.