pub struct FixedArray<T, const N: usize>(/* private fields */);
Expand description
FixedArray - T[M]
Trait Implementations§
Source§impl<T: EventTopic, const N: usize> EventTopic for FixedArray<T, N>
impl<T: EventTopic, const N: usize> EventTopic for FixedArray<T, N>
Source§fn topic_preimage_length(rust: &Self::RustType) -> usize
fn topic_preimage_length(rust: &Self::RustType) -> usize
The number of bytes this type occupies in another topic’s preimage,
usually a multiple of 32. Read more
Source§fn encode_topic_preimage(rust: &Self::RustType, out: &mut Vec<u8>)
fn encode_topic_preimage(rust: &Self::RustType, out: &mut Vec<u8>)
Encodes this type as preimage bytes which are then hashed in
complex types’
encode_topic
. Read moreSource§impl<T: SolType, const N: usize> SolType for FixedArray<T, N>
impl<T: SolType, const N: usize> SolType for FixedArray<T, N>
Source§const ENCODED_SIZE: Option<usize> = _
const ENCODED_SIZE: Option<usize> = _
The statically-known ABI-encoded size of the type. Read more
Source§const PACKED_ENCODED_SIZE: Option<usize> = None
const PACKED_ENCODED_SIZE: Option<usize> = None
The statically-known Non-standard Packed Mode ABI-encoded size of the type. Read more
Source§type Token<'a> = FixedSeqToken<<T as SolType>::Token<'a>, N>
type Token<'a> = FixedSeqToken<<T as SolType>::Token<'a>, N>
The corresponding ABI token type. Read more
Source§fn valid_token(token: &Self::Token<'_>) -> bool
fn valid_token(token: &Self::Token<'_>) -> bool
Returns
true
if the given token can be detokenized with this type.Source§fn detokenize(token: Self::Token<'_>) -> Self::RustType
fn detokenize(token: Self::Token<'_>) -> Self::RustType
Detokenize this type’s value from the given token. Read more
Source§fn sol_type_name() -> Cow<'static, str>
fn sol_type_name() -> Cow<'static, str>
👎Deprecated since 0.6.3: use
SOL_NAME
insteadReturns the name of this type in Solidity.
Source§fn abi_encoded_size<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> usize
fn abi_encoded_size<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> usize
Calculate the ABI-encoded size of the data, counting both head and tail
words. For a single-word type this will always be 32.
Source§fn type_check(token: &Self::Token<'_>) -> Result<()>
fn type_check(token: &Self::Token<'_>) -> Result<()>
Returns an error if the given token cannot be detokenized with this
type.
Source§fn tokenize<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Self::Token<'_>
fn tokenize<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Self::Token<'_>
Tokenizes the given value into this type’s token. Read more
Source§fn eip712_data_word<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Word
fn eip712_data_word<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Word
Encode this data according to EIP-712
encodeData
rules, and hash it
if necessary. Read moreSource§fn abi_packed_encoded_size<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> usize
fn abi_packed_encoded_size<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> usize
Returns the length of this value when ABI-encoded in Non-standard Packed Mode. Read more
Source§fn abi_encode_packed_to<E: ?Sized + SolTypeValue<Self>>(
rust: &E,
out: &mut Vec<u8>,
)
fn abi_encode_packed_to<E: ?Sized + SolTypeValue<Self>>( rust: &E, out: &mut Vec<u8>, )
Non-standard Packed Mode ABI encoding. Read more
Source§fn abi_encode_packed<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
fn abi_encode_packed<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
Non-standard Packed Mode ABI encoding. Read more
Source§fn abi_encode<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
fn abi_encode<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
Tokenizes and ABI-encodes the given value by wrapping it in a
single-element sequence. Read more
Source§fn abi_encode_params<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
fn abi_encode_params<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
Tokenizes and ABI-encodes the given value as function parameters. Read more
Source§fn abi_encode_sequence<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
fn abi_encode_sequence<E: ?Sized + SolTypeValue<Self>>(rust: &E) -> Vec<u8> ⓘ
Tokenizes and ABI-encodes the given value as a sequence. Read more
Source§fn abi_decode(data: &[u8], validate: bool) -> Result<Self::RustType>
fn abi_decode(data: &[u8], validate: bool) -> Result<Self::RustType>
Decodes this type’s value from an ABI blob by interpreting it as a
single-element sequence. Read more
Auto Trait Implementations§
impl<T, const N: usize> Freeze for FixedArray<T, N>
impl<T, const N: usize> RefUnwindSafe for FixedArray<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for FixedArray<T, N>where
T: Send,
impl<T, const N: usize> Sync for FixedArray<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for FixedArray<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for FixedArray<T, N>where
T: UnwindSafe,
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