pub struct PacketData {
pub token: Coin<PrefixedDenom>,
pub sender: Signer,
pub receiver: Signer,
pub memo: Memo,
}
Expand description
Defines the structure of token transfers’ packet bytes
Fields§
§token: Coin<PrefixedDenom>
§sender: Signer
§receiver: Signer
§memo: Memo
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for PacketData
impl<'arbitrary> Arbitrary<'arbitrary> for PacketData
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<PacketData, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<PacketData, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<PacketData, Error>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<PacketData, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl BorshDeserialize for PacketData
impl BorshDeserialize for PacketData
fn deserialize_reader<__R>(reader: &mut __R) -> Result<PacketData, Error>where
__R: Read,
Source§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.
Source§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 PacketData
impl BorshSerialize for PacketData
Source§impl Clone for PacketData
impl Clone for PacketData
Source§fn clone(&self) -> PacketData
fn clone(&self) -> PacketData
Returns a duplicate 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 PacketData
impl Debug for PacketData
Source§impl Decode for PacketData
impl Decode for PacketData
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<PacketData, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<PacketData, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
Source§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
Source§impl<'de> Deserialize<'de> for PacketData
impl<'de> Deserialize<'de> for PacketData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PacketData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PacketData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for PacketData
impl Encode for PacketData
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,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§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.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl From<PacketData> for FungibleTokenPacketData
impl From<PacketData> for FungibleTokenPacketData
Source§fn from(pkt_data: PacketData) -> FungibleTokenPacketData
fn from(pkt_data: PacketData) -> FungibleTokenPacketData
Converts to this type from the input type.
Source§impl JsonSchema for PacketData
impl JsonSchema for PacketData
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§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 PartialEq for PacketData
impl PartialEq for PacketData
Source§impl Serialize for PacketData
impl Serialize for PacketData
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<FungibleTokenPacketData> for PacketData
impl TryFrom<FungibleTokenPacketData> for PacketData
Source§type Error = DecodingError
type Error = DecodingError
The type returned in the event of a conversion error.
Source§fn try_from(
raw_pkt_data: FungibleTokenPacketData,
) -> Result<PacketData, <PacketData as TryFrom<FungibleTokenPacketData>>::Error>
fn try_from( raw_pkt_data: FungibleTokenPacketData, ) -> Result<PacketData, <PacketData as TryFrom<FungibleTokenPacketData>>::Error>
Performs the conversion.
impl EncodeLike for PacketData
impl Eq for PacketData
impl StructuralPartialEq for PacketData
Auto Trait Implementations§
impl Freeze for PacketData
impl RefUnwindSafe for PacketData
impl Send for PacketData
impl Sync for PacketData
impl Unpin for PacketData
impl UnwindSafe for PacketData
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