#[non_exhaustive]pub struct Instrument {
pub id: String,
pub name: String,
pub symbol: String,
pub total_supply: Option<String>,
pub total_supply_as_of: Option<String>,
pub decimals: i32,
pub supported_apis: BTreeMap<String, i32>,
pub paused: bool,
pub pause_info: Option<PauseInfo>,
pub account_input_fields_to_show: Option<Vec<String>>,
}Expand description
An instrument the registry issues.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringThe instrument id, as it appears in a Holding.
name: StringHuman-readable name.
symbol: StringTicker-style symbol.
total_supply: Option<String>Total supply, when the registry publishes one.
total_supply_as_of: Option<String>When total_supply was measured.
decimals: i32How many decimal places amounts of this instrument carry.
The standard marks this required with a default of 10, so an absent field means ten places — not “unknown”. Reporting it as unknown pushes a display-precision decision about money onto a caller who has no better information than this default.
supported_apis: BTreeMap<String, i32>Which token-standard APIs apply to this instrument.
paused: boolA paused instrument cannot be transferred or allocated (metadata-v1
1.2.0). Absent on older registries, which is the same as false.
pause_info: Option<PauseInfo>Why, and until when, if the registry says.
account_input_fields_to_show: Option<Vec<String>>For V2 wallets: which Account input fields this instrument’s users
must fill in — provider, accountId. Absent means the registry did
not say, not that there are none.
Trait Implementations§
Source§impl Clone for Instrument
impl Clone for Instrument
Source§impl Debug for Instrument
impl Debug for Instrument
Source§impl<'de> Deserialize<'de> for Instrument
impl<'de> Deserialize<'de> for Instrument
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>,
Auto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin for Instrument
impl UnsafeUnpin for Instrument
impl UnwindSafe for Instrument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§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>
T in a tonic::Request