Type Alias TransactTo
pub type TransactTo = TxKind;
Expand description
Transaction destination
Aliased Type§
enum TransactTo {
Create,
Call(Address),
}
Variants§
Create
A transaction that creates a contract.
Call(Address)
A transaction that calls a contract or transfer.
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 21 bytes
Size for each variant:
Create
: 0 bytesCall
: 20 bytes
Implementations
Trait Implementations
§impl<'arbitrary> Arbitrary<'arbitrary> for TxKind
impl<'arbitrary> Arbitrary<'arbitrary> for TxKind
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<TxKind, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<TxKind, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<TxKind, Error>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<TxKind, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read more§impl Arbitrary for TxKind
impl Arbitrary for TxKind
§type Parameters = <Address as Arbitrary>::Parameters
type Parameters = <Address as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = TupleUnion<((u32, Arc<fn() -> TxKind>), (u32, Arc<Map<<Address as Arbitrary>::Strategy, fn(_: Address) -> TxKind>>))>
type Strategy = TupleUnion<((u32, Arc<fn() -> TxKind>), (u32, Arc<Map<<Address as Arbitrary>::Strategy, fn(_: Address) -> TxKind>>))>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_top: <TxKind as Arbitrary>::Parameters,
) -> <TxKind as Arbitrary>::Strategy
fn arbitrary_with( _top: <TxKind as Arbitrary>::Parameters, ) -> <TxKind as Arbitrary>::Strategy
§impl Compact for TxKind
impl Compact for TxKind
§fn to_compact<B>(&self, buf: &mut B) -> usize
fn to_compact<B>(&self, buf: &mut B) -> usize
Takes a buffer which can be written to. Ideally, it returns the length written to.
§fn from_compact(buf: &[u8], identifier: usize) -> (TxKind, &[u8])
fn from_compact(buf: &[u8], identifier: usize) -> (TxKind, &[u8])
Takes a buffer which can be read from. Returns the object and
buf
with its internal cursor
advanced (eg..advance(len)
). Read more§fn specialized_to_compact<B>(&self, buf: &mut B) -> usize
fn specialized_to_compact<B>(&self, buf: &mut B) -> usize
“Optional”: If there’s no good reason to use it, don’t.
§fn specialized_from_compact(buf: &[u8], len: usize) -> (Self, &[u8])
fn specialized_from_compact(buf: &[u8], len: usize) -> (Self, &[u8])
“Optional”: If there’s no good reason to use it, don’t.
§impl<'de> Deserialize<'de> for TxKind
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for TxKind
Available on crate feature
serde
only.§fn deserialize<D>(
deserializer: D,
) -> Result<TxKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TxKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for TxKind
Available on crate feature serde
only.
impl Serialize for TxKind
Available on crate feature
serde
only.§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