pub struct ChannelAssetBindingV1 {
pub schema: String,
pub currency: String,
pub protocol_minor_unit_decimals: u8,
pub chain_id: String,
pub token_address: String,
pub token_symbol: String,
pub token_decimals: u8,
pub settlement_policy_digest: String,
}Fields§
§schema: String§currency: String§protocol_minor_unit_decimals: u8§chain_id: String§token_address: String§token_symbol: String§token_decimals: u8§settlement_policy_digest: StringImplementations§
Source§impl ChannelAssetBindingV1
impl ChannelAssetBindingV1
pub fn validate(&self) -> Result<(), ChannelError>
pub fn digest(&self) -> Result<String, ChannelError>
pub fn token_base_units( &self, amount: &MonetaryAmount, ) -> Result<String, ChannelError>
pub fn monetary_amount( &self, token_base_units: &str, ) -> Result<MonetaryAmount, ChannelError>
pub fn verify_round_trip( &self, amount: &MonetaryAmount, token_base_units: &str, ) -> Result<(), ChannelError>
Trait Implementations§
Source§impl Clone for ChannelAssetBindingV1
impl Clone for ChannelAssetBindingV1
Source§fn clone(&self) -> ChannelAssetBindingV1
fn clone(&self) -> ChannelAssetBindingV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ChannelAssetBindingV1
impl Debug for ChannelAssetBindingV1
Source§impl<'de> Deserialize<'de> for ChannelAssetBindingV1
impl<'de> Deserialize<'de> for ChannelAssetBindingV1
Source§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 Eq for ChannelAssetBindingV1
Source§impl PartialEq for ChannelAssetBindingV1
impl PartialEq for ChannelAssetBindingV1
Source§impl Serialize for ChannelAssetBindingV1
impl Serialize for ChannelAssetBindingV1
impl StructuralPartialEq for ChannelAssetBindingV1
Auto Trait Implementations§
impl Freeze for ChannelAssetBindingV1
impl RefUnwindSafe for ChannelAssetBindingV1
impl Send for ChannelAssetBindingV1
impl Sync for ChannelAssetBindingV1
impl Unpin for ChannelAssetBindingV1
impl UnsafeUnpin for ChannelAssetBindingV1
impl UnwindSafe for ChannelAssetBindingV1
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