Enum switchboard_solana::prelude::error::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.
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 Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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
§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
Compare self to
key
and return true
if they are equal.