pub struct Address { /* fields omitted */ }
Representation of an Ethereum address.
Address is usually derived from a PrivateKey
, or converted from its
textual representation.
Creates new Address
filled with zeros.
The actual implementation of this doesn't really
creates the zeros. In our case we treat it as "empty"
address, which is then reperesented by zeros.
Get raw bytes of the address.
Performs copy-assignment from source
. Read more
Creates a textual representation of the Address
.
use clarity::Address;
let address = Address::default();
address.to_string();
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Construct a default Address
filled with zeros.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string into a valid Ethereum address.
0x
prefixed address
- Raw bytes of an address represented by a bytes as an hexadecimal.
use clarity::Address;
Address::from_str("0x0102030405060708090a0b0c0d0e0f1011121314").unwrap();
Address::from_str("0102030405060708090a0b0c0d0e0f1011121314").unwrap();
let _address : Address = "14131211100f0e0d0c0b0a090807060504030201".parse().unwrap();
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Formats the value using the given formatter.
Formats the value using the given formatter.
Serialize this value into the given Serde serializer. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts the given value to a String
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more