pub trait MuxedAddress {
// Required methods
fn generate(env: &Env) -> MuxedAddress;
fn new<T: Into<MuxedAddress>>(address: T, id: u64) -> MuxedAddress;
}testutils only.Required Methods§
Sourcefn generate(env: &Env) -> MuxedAddress
fn generate(env: &Env) -> MuxedAddress
Create a new MuxedAddress with arbitrary Address and id parts.
Note, that since currently only accounts can be multiplexed, the
underlying Address will be an account (not contract) address.
Sourcefn new<T: Into<MuxedAddress>>(address: T, id: u64) -> MuxedAddress
fn new<T: Into<MuxedAddress>>(address: T, id: u64) -> MuxedAddress
Returns a new MuxedAddress that has the same Address part as the
provided address and the provided multiplexing id.
address can be either an Address or MuxedAddress and it has to
be an account (non-contract) address.
Note on usage: the simplest way to test MuxedAddress is to generate
an arbitrary valid address with MuxedAddress::generate, then
MuxedAddress::new can be used to alter only the multiplexing id part
of that address.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.