Struct coreledger_backend::model::Supply
pub struct Supply {
pub open_amount: u256,
pub exchange_rate: u256,
pub valid_until: u64,
pub owner: Principal,
pub parameters: Option<SupplyParameters>,
}
Expand description
Details of the asset.
Fields§
§open_amount: u256
Amount of units available for tradging
exchange_rate: u256
Exchange rate of the suppply.
valid_until: u64
Unix-time timestamp in nanoseconds when the supply expires.
owner: Principal
Address of the asset owner.
parameters: Option<SupplyParameters>
Optional parameters. This field has value, if any of optional parameters has a non-default value.
Implementations§
§impl Supply
impl Supply
pub fn new( open_amount: u256, exchange_rate: u256, valid_until: u64, owner: Principal ) -> Self
pub fn beneficiary(&self) -> Principal
pub fn controller(&self) -> Option<ContractId>
Trait Implementations§
§impl<'de> Deserialize<'de> for Supply
impl<'de> Deserialize<'de> for Supply
§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
Auto Trait Implementations§
impl Freeze for Supply
impl RefUnwindSafe for Supply
impl Send for Supply
impl Sync for Supply
impl Unpin for Supply
impl UnwindSafe for Supply
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