#[repr(u32)]pub enum ClockworkError {
InvalidThreadResponse,
InvalidThreadState,
InvalidTriggerVariant,
TriggerConditionFailed,
ThreadBusy,
ThreadPaused,
RateLimitExeceeded,
MaxRateLimitExceeded,
UnauthorizedWrite,
WithdrawalTooLarge,
}
Expand description
Errors for the the Clockwork thread program.
Variants§
InvalidThreadResponse
Thrown if a exec response has an invalid program ID or cannot be parsed.
InvalidThreadState
Thrown if a thread has an invalid state and cannot complete the operation.
InvalidTriggerVariant
TThe provided trigger variant is invalid.
TriggerConditionFailed
Thrown if a exec instruction is invalid because the thread’s trigger condition has not been met.
ThreadBusy
ThreadPaused
Thrown if a request is invalid because the thread is currently paused.
RateLimitExeceeded
Thrown if a exec instruction would cause a thread to exceed its rate limit.
MaxRateLimitExceeded
Thrown if a thread authority attempts to set a rate limit above the maximum allowed value.
Thrown if an inner instruction attempted to write to an unauthorized address.
WithdrawalTooLarge
Thrown if the user attempts to withdraw SOL that would put a thread below it’s minimum rent threshold.
Implementations§
Trait Implementations§
source§impl Clone for ClockworkError
impl Clone for ClockworkError
source§fn clone(&self) -> ClockworkError
fn clone(&self) -> ClockworkError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClockworkError
impl Debug for ClockworkError
source§impl Display for ClockworkError
impl Display for ClockworkError
source§impl From<ClockworkError> for Error
impl From<ClockworkError> for Error
source§fn from(error_code: ClockworkError) -> Error
fn from(error_code: ClockworkError) -> Error
Converts to this type from the input type.
source§impl From<ClockworkError> for u32
impl From<ClockworkError> for u32
source§fn from(e: ClockworkError) -> u32
fn from(e: ClockworkError) -> u32
Converts to this type from the input type.
impl Copy for ClockworkError
Auto Trait Implementations§
impl RefUnwindSafe for ClockworkError
impl Send for ClockworkError
impl Sync for ClockworkError
impl Unpin for ClockworkError
impl UnwindSafe for ClockworkError
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