pub enum FrameAddress {
Empty,
Address(Address),
}Expand description
An empty or explicit address in a frame transaction.
Empty targets resolve to the transaction sender. Empty signature signers resolve to the sender
for protocol-validated schemes and represent no signer for arbitrary signatures.
RLP encodes the empty case as an empty byte string, preserving the EIP-8141 wire format.
JSON uses hex byte strings, including "0x" for the empty case; null also deserializes as
empty.
Variants§
Implementations§
Source§impl FrameAddress
impl FrameAddress
Sourcepub const fn is_address(self) -> bool
pub const fn is_address(self) -> bool
Returns true if this is Self::Address.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for FrameAddress
impl<'arbitrary> Arbitrary<'arbitrary> for FrameAddress
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<FrameAddress, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<FrameAddress, Error>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>,
) -> Result<FrameAddress, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary>, ) -> Result<FrameAddress, 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 FrameAddress
impl BorshDeserialize for FrameAddress
fn deserialize_reader<__R>(reader: &mut __R) -> Result<FrameAddress, 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 FrameAddress
impl BorshSerialize for FrameAddress
Source§impl Clone for FrameAddress
impl Clone for FrameAddress
Source§fn clone(&self) -> FrameAddress
fn clone(&self) -> FrameAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FrameAddress
Source§impl Debug for FrameAddress
impl Debug for FrameAddress
Source§impl Decodable for FrameAddress
impl Decodable for FrameAddress
Source§impl Default for FrameAddress
impl Default for FrameAddress
Source§fn default() -> FrameAddress
fn default() -> FrameAddress
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FrameAddress
Available on crate feature serde only.
impl<'de> Deserialize<'de> for FrameAddress
Available on crate feature
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<FrameAddress, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<FrameAddress, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encodable for FrameAddress
impl Encodable for FrameAddress
Source§impl EnumExt for FrameAddress
impl EnumExt for FrameAddress
Source§fn deserialize_variant<__R>(
reader: &mut __R,
variant_tag: u8,
) -> Result<FrameAddress, Error>where
__R: Read,
fn deserialize_variant<__R>(
reader: &mut __R,
variant_tag: u8,
) -> Result<FrameAddress, Error>where
__R: Read,
Deserialises given variant of an enum from the reader. Read more
impl Eq for FrameAddress
Source§impl From<Address> for FrameAddress
impl From<Address> for FrameAddress
Source§fn from(value: Address) -> FrameAddress
fn from(value: Address) -> FrameAddress
Converts to this type from the input type.
Source§impl Hash for FrameAddress
impl Hash for FrameAddress
Source§impl PartialEq for FrameAddress
impl PartialEq for FrameAddress
Source§impl Serialize for FrameAddress
Available on crate feature serde only.
impl Serialize for FrameAddress
Available on crate feature
serde only.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
impl StructuralPartialEq for FrameAddress
Source§impl TryFrom<&[u8]> for FrameAddress
impl TryFrom<&[u8]> for FrameAddress
Source§type Error = Eip8141Error
type Error = Eip8141Error
The type returned in the event of a conversion error.
Source§fn try_from(
value: &[u8],
) -> Result<FrameAddress, <FrameAddress as TryFrom<&[u8]>>::Error>
fn try_from( value: &[u8], ) -> Result<FrameAddress, <FrameAddress as TryFrom<&[u8]>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for FrameAddress
impl RefUnwindSafe for FrameAddress
impl Send for FrameAddress
impl Sync for FrameAddress
impl Unpin for FrameAddress
impl UnsafeUnpin for FrameAddress
impl UnwindSafe for FrameAddress
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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:
Empty: 0 bytesAddress: 20 bytes