Struct ibc_data_types::apps::transfer::PrefixedDenom
source · pub struct PrefixedDenom {
pub trace_path: TracePath,
pub base_denom: BaseDenom,
}
Expand description
A type that contains the base denomination for ICS20 and the source tracing information path.
Fields§
§trace_path: TracePath
A series of {port-id}/{channel-id}
s for tracing the source of the token.
base_denom: BaseDenom
Base denomination of the relayed fungible token.
Implementations§
source§impl PrefixedDenom
impl PrefixedDenom
sourcepub fn remove_trace_prefix(&mut self, prefix: &TracePrefix)
pub fn remove_trace_prefix(&mut self, prefix: &TracePrefix)
Removes the specified prefix from the trace path if there is a match, otherwise does nothing.
sourcepub fn add_trace_prefix(&mut self, prefix: TracePrefix)
pub fn add_trace_prefix(&mut self, prefix: TracePrefix)
Adds the specified prefix to the trace path.
Trait Implementations§
source§impl BorshDeserialize for PrefixedDenom
impl BorshDeserialize for PrefixedDenom
fn deserialize_reader<R>(reader: &mut R) -> Result<PrefixedDenom, Error>where
R: Read,
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for PrefixedDenom
impl BorshSerialize for PrefixedDenom
source§impl Clone for PrefixedDenom
impl Clone for PrefixedDenom
source§fn clone(&self) -> PrefixedDenom
fn clone(&self) -> PrefixedDenom
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 PrefixedDenom
impl Debug for PrefixedDenom
source§impl Decode for PrefixedDenom
impl Decode for PrefixedDenom
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<PrefixedDenom, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<PrefixedDenom, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl<'de> Deserialize<'de> for PrefixedDenom
impl<'de> Deserialize<'de> for PrefixedDenom
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PrefixedDenom, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PrefixedDenom, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PrefixedDenom
impl Display for PrefixedDenom
source§impl Encode for PrefixedDenom
impl Encode for PrefixedDenom
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<BaseDenom> for PrefixedDenom
impl From<BaseDenom> for PrefixedDenom
source§fn from(denom: BaseDenom) -> PrefixedDenom
fn from(denom: BaseDenom) -> PrefixedDenom
Converts to this type from the input type.
source§impl From<PrefixedDenom> for DenomTrace
impl From<PrefixedDenom> for DenomTrace
source§fn from(value: PrefixedDenom) -> DenomTrace
fn from(value: PrefixedDenom) -> DenomTrace
Converts to this type from the input type.
source§impl FromStr for PrefixedDenom
impl FromStr for PrefixedDenom
§type Err = TokenTransferError
type Err = TokenTransferError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<PrefixedDenom, <PrefixedDenom as FromStr>::Err>
fn from_str(s: &str) -> Result<PrefixedDenom, <PrefixedDenom as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresource§impl JsonSchema for PrefixedDenom
impl JsonSchema for PrefixedDenom
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for PrefixedDenom
impl Ord for PrefixedDenom
source§fn cmp(&self, other: &PrefixedDenom) -> Ordering
fn cmp(&self, other: &PrefixedDenom) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PrefixedDenom
impl PartialEq for PrefixedDenom
source§fn eq(&self, other: &PrefixedDenom) -> bool
fn eq(&self, other: &PrefixedDenom) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PrefixedDenom
impl PartialOrd for PrefixedDenom
source§fn partial_cmp(&self, other: &PrefixedDenom) -> Option<Ordering>
fn partial_cmp(&self, other: &PrefixedDenom) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PrefixedDenom
impl Serialize for PrefixedDenom
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 TryFrom<DenomTrace> for PrefixedDenom
impl TryFrom<DenomTrace> for PrefixedDenom
§type Error = TokenTransferError
type Error = TokenTransferError
The type returned in the event of a conversion error.
source§fn try_from(
value: DenomTrace
) -> Result<PrefixedDenom, <PrefixedDenom as TryFrom<DenomTrace>>::Error>
fn try_from( value: DenomTrace ) -> Result<PrefixedDenom, <PrefixedDenom as TryFrom<DenomTrace>>::Error>
Performs the conversion.
source§impl TypeInfo for PrefixedDenom
impl TypeInfo for PrefixedDenom
impl EncodeLike for PrefixedDenom
impl Eq for PrefixedDenom
impl StructuralEq for PrefixedDenom
impl StructuralPartialEq for PrefixedDenom
Auto Trait Implementations§
impl RefUnwindSafe for PrefixedDenom
impl Send for PrefixedDenom
impl Sync for PrefixedDenom
impl Unpin for PrefixedDenom
impl UnwindSafe for PrefixedDenom
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<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more