Enum switchboard_solana::prelude::Error
pub enum Error {
AnchorError(Box<AnchorError>),
ProgramError(Box<ProgramErrorWithOrigin>),
}
Variants§
AnchorError(Box<AnchorError>)
ProgramError(Box<ProgramErrorWithOrigin>)
Implementations§
§impl Error
impl Error
pub fn log(&self)
pub fn with_account_name(self, account_name: impl ToString) -> Error
pub fn with_source(self, source: Source) -> Error
pub fn with_pubkeys(self, pubkeys: (Pubkey, Pubkey)) -> Error
pub fn with_values(self, values: (impl ToString, impl ToString)) -> Error
Trait Implementations§
§impl Error for Error
impl Error for Error
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()
§impl From<AnchorError> for Error
impl From<AnchorError> for Error
§fn from(ae: AnchorError) -> Error
fn from(ae: AnchorError) -> Error
Converts to this type from the input type.
§impl From<Error> for ProgramError
impl From<Error> for ProgramError
§fn from(e: Error) -> ProgramError
fn from(e: Error) -> ProgramError
Converts to this type from the input type.
§impl From<ProgramError> for Error
impl From<ProgramError> for Error
§fn from(program_error: ProgramError) -> Error
fn from(program_error: ProgramError) -> Error
Converts to this type from the input type.
§impl From<ProgramErrorWithOrigin> for Error
impl From<ProgramErrorWithOrigin> for Error
§fn from(pe: ProgramErrorWithOrigin) -> Error
fn from(pe: ProgramErrorWithOrigin) -> Error
Converts to this type from the input type.
source§impl From<SwitchboardError> for Error
impl From<SwitchboardError> for Error
source§fn from(error_code: SwitchboardError) -> Error
fn from(error_code: SwitchboardError) -> Error
Converts to this type from the input type.
§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
§fn from(e: TryFromIntError) -> Error
fn from(e: TryFromIntError) -> Error
Converts to this type from the input type.
impl Eq for Error
impl StructuralPartialEq for Error
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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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