pub struct AssetSpec {
pub ticker: Ticker,
pub name: Name,
pub details: Option<Details>,
pub precision: Precision,
}Fields§
§ticker: Ticker§name: Name§details: Option<Details>§precision: PrecisionImplementations§
Source§impl AssetSpec
impl AssetSpec
pub fn new( ticker: &'static str, name: &'static str, precision: Precision, ) -> AssetSpec
pub fn with( ticker: &str, name: &str, precision: Precision, details: Option<&str>, ) -> Result<AssetSpec, InvalidRString>
pub fn from_strict_val_unchecked(value: &StrictVal) -> AssetSpec
pub fn ticker(&self) -> &str
pub fn name(&self) -> &str
pub fn details(&self) -> Option<&str>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AssetSpec
impl<'de> Deserialize<'de> for AssetSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AssetSpec
Source§impl Serialize for AssetSpec
impl Serialize for AssetSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for AssetSpec
impl StrictDecode for AssetSpec
fn strict_decode(reader: &mut impl TypedRead) -> Result<AssetSpec, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for AssetSpec
impl StrictDeserialize for AssetSpec
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for AssetSpec
impl StrictDumb for AssetSpec
fn strict_dumb() -> AssetSpec
Source§impl StrictEncode for AssetSpec
impl StrictEncode for AssetSpec
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
impl StrictProduct for AssetSpec
Source§impl StrictSerialize for AssetSpec
impl StrictSerialize for AssetSpec
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictStruct for AssetSpec
impl StrictStruct for AssetSpec
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for AssetSpec
impl StrictType for AssetSpec
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_CONTRACT
fn strict_name() -> Option<TypeName>
impl StructuralPartialEq for AssetSpec
Auto Trait Implementations§
impl Freeze for AssetSpec
impl RefUnwindSafe for AssetSpec
impl Send for AssetSpec
impl Sync for AssetSpec
impl Unpin for AssetSpec
impl UnsafeUnpin for AssetSpec
impl UnwindSafe for AssetSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.