Enum KernelEvent

Source
pub enum KernelEvent {
Show 17 variants AllocationStarted { op_id: u64, total: u128, plan_len: u32, }, AllocationStepFailed { op_id: u64, index: u32, remaining: u128, total_allocated: u128, }, AllocationCompleted { op_id: u64, has_withdrawal: bool, }, WithdrawalStarted { op_id: u64, amount: u128, escrow_shares: u128, owner: Address, receiver: Address, }, WithdrawalCollected { op_id: u64, burn_shares: u128, collected: u128, }, WithdrawalStopped { op_id: u64, escrow_shares: u128, }, WithdrawalSkipped { id: u64, owner: Address, receiver: Address, escrow_shares: u128, expected_assets: u128, reason: WithdrawalSkipReason, }, RefreshStarted { op_id: u64, plan_len: u32, }, RefreshCompleted { op_id: u64, }, PayoutCompleted { op_id: u64, success: bool, burn_shares: u128, refund_shares: u128, amount: u128, }, DepositProcessed { owner: Address, receiver: Address, assets_in: u128, shares_out: u128, }, AtomicWithdrawProcessed { owner: Address, receiver: Address, shares_burned: u128, assets_out: u128, }, WithdrawalRequested { id: u64, owner: Address, receiver: Address, shares: u128, expected_assets: u128, }, ExternalAssetsSynced { op_id: u64, new_external_assets: u128, total_assets: u128, }, FeesRefreshed { now_ns: u64, total_assets: u128, }, PauseUpdated { paused: bool, }, EmergencyResetCompleted { op_id: u64, from_state: u32, },
}

Variants§

§

AllocationStarted

Allocation operation started.

Fields

§op_id: u64
§total: u128
§plan_len: u32
§

AllocationStepFailed

Allocation step failed and allocation aborted.

Fields

§op_id: u64
§index: u32
§remaining: u128
§total_allocated: u128

Amount successfully allocated before failure (original total - remaining). Caller uses this to restore idle_assets correctly.

§

AllocationCompleted

Allocation completed (either returns to Idle or proceeds to withdrawal).

Fields

§op_id: u64
§has_withdrawal: bool
§

WithdrawalStarted

Withdrawal operation started.

Fields

§op_id: u64
§amount: u128
§escrow_shares: u128
§owner: Address
§receiver: Address
§

WithdrawalCollected

Withdrawal collected enough to proceed to payout.

Fields

§op_id: u64
§burn_shares: u128
§collected: u128
§

WithdrawalStopped

Withdrawal stopped and escrow refunded.

Fields

§op_id: u64
§escrow_shares: u128
§

WithdrawalSkipped

Withdrawal skipped and escrow refunded without entering withdrawal execution.

Fields

§id: u64
§owner: Address
§receiver: Address
§escrow_shares: u128
§expected_assets: u128
§

RefreshStarted

Refresh operation started.

Fields

§op_id: u64
§plan_len: u32
§

RefreshCompleted

Refresh operation completed.

Fields

§op_id: u64
§

PayoutCompleted

Payout completed (success or failure).

Fields

§op_id: u64
§success: bool
§burn_shares: u128
§refund_shares: u128
§amount: u128
§

DepositProcessed

Deposit processed and shares minted.

Fields

§owner: Address
§receiver: Address
§assets_in: u128
§shares_out: u128
§

AtomicWithdrawProcessed

Fields

§owner: Address
§receiver: Address
§shares_burned: u128
§assets_out: u128
§

WithdrawalRequested

Withdrawal requested and enqueued.

Fields

§id: u64
§owner: Address
§receiver: Address
§shares: u128
§expected_assets: u128
§

ExternalAssetsSynced

External assets synchronized for an operation.

Fields

§op_id: u64
§new_external_assets: u128
§total_assets: u128
§

FeesRefreshed

Fees refreshed for the vault.

Fields

§now_ns: u64
§total_assets: u128
§

PauseUpdated

Pause state updated.

Fields

§paused: bool
§

EmergencyResetCompleted

Emergency reset forced the vault back to Idle.

Fields

§op_id: u64
§from_state: u32

Implementations§

Source§

impl KernelEvent

Source

pub fn required_addresses(&self) -> Vec<Address>

Collect all addresses referenced by this event.

Trait Implementations§

Source§

impl Clone for KernelEvent

Source§

fn clone(&self) -> KernelEvent

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KernelEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<KernelEvent> for KernelEffect

Source§

fn from(event: KernelEvent) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for KernelEvent

Source§

fn eq(&self, other: &KernelEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for KernelEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for KernelEvent

Source§

impl StructuralPartialEq for KernelEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V