Struct coreledger_backend::events::SupplyUpdate
pub struct SupplyUpdate {
pub supply_id: SupplyId,
pub event_id: SupplyUpdateCode,
pub current_amount: u256,
}
Expand description
Occurs when supply changes.
Fields§
§supply_id: SupplyId
Id of the supply.
event_id: SupplyUpdateCode
Type of change.
current_amount: u256
Open amount of the supply after the change.
Implementations§
§impl SupplyUpdate
impl SupplyUpdate
pub const NEW_SUPPLY_CREATED: u8 = 1u8
pub const SUPPLY_CONSUMED: u8 = 2u8
pub const REMAINING_AMOUNT_CHANGED_TO_A_NEW_VALUE_UPDATE_SUPPLY_AMOUNT: u8 = 4u8
pub const UPDATE_SUPPLY_CONTROLLER_WITH_NON_EMPTY_CONTROLLER: u8 = 5u8
pub const UPDATE_SUPPLY_EXPIRY_DATE: u8 = 6u8
pub const UPDATE_SUPPLY_REMOVE_CONTROLLER: u8 = 7u8
pub const SUPPLY_TERMINATED: u8 = 9u8
pub const NEW_SUPPLY_CREATED_BY_UPDATE_SUPPLY_EXCHANGE_RATE_THIS_IS_THE_NEW_SUPPLY: u8 = 161u8
pub const SUPPLY_TERMINATED_BY_UPDATE_SUPPLY_EXCHANGE_RATE_THIS_IS_THE_OLD_SUPPLY: u8 = 169u8
pub fn new( supply_id: SupplyId, event_id: SupplyUpdateCode, current_amount: u256 ) -> Self
Trait Implementations§
§impl CandidType for SupplyUpdate
impl CandidType for SupplyUpdate
§impl Clone for SupplyUpdate
impl Clone for SupplyUpdate
§fn clone(&self) -> SupplyUpdate
fn clone(&self) -> SupplyUpdate
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 more§impl<'de> Deserialize<'de> for SupplyUpdate
impl<'de> Deserialize<'de> for SupplyUpdate
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for SupplyUpdate
impl Serialize for SupplyUpdate
Auto Trait Implementations§
impl Freeze for SupplyUpdate
impl RefUnwindSafe for SupplyUpdate
impl Send for SupplyUpdate
impl Sync for SupplyUpdate
impl Unpin for SupplyUpdate
impl UnwindSafe for SupplyUpdate
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