pub struct AssetMetadata {
pub asset_id: String,
pub name: String,
pub ticker: String,
pub precision: u8,
}
Expand description
Configuration for asset metadata. Each asset metadata item represents an entry in the Liquid Asset Registry. An example Liquid Asset in the registry would be Tether USD.
Fields§
§asset_id: String
The asset id of the registered asset
name: String
The name of the asset
ticker: String
The ticker of the asset
precision: u8
The precision used to display the asset amount. For example, precision of 2 shifts the decimal 2 places left from the satoshi amount.
Implementations§
Source§impl AssetMetadata
impl AssetMetadata
pub fn amount_to_sat(&self, amount: f64) -> u64
pub fn amount_from_sat(&self, amount_sat: u64) -> f64
Trait Implementations§
Source§impl Clone for AssetMetadata
impl Clone for AssetMetadata
Source§fn clone(&self) -> AssetMetadata
fn clone(&self) -> AssetMetadata
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 AssetMetadata
impl Debug for AssetMetadata
Source§impl IntoDart for AssetMetadata
impl IntoDart for AssetMetadata
Source§impl IntoIntoDart<AssetMetadata> for AssetMetadata
impl IntoIntoDart<AssetMetadata> for AssetMetadata
fn into_into_dart(self) -> AssetMetadata
Source§impl Serialize for AssetMetadata
impl Serialize for AssetMetadata
impl IntoDartExceptPrimitive for AssetMetadata
Auto Trait Implementations§
impl Freeze for AssetMetadata
impl Send for AssetMetadata
impl Sync for AssetMetadata
impl RefUnwindSafe for AssetMetadata
impl Unpin for AssetMetadata
impl UnwindSafe for AssetMetadata
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request