pub enum FunctionParamType {
Address,
Bytes,
Int(usize),
Uint(usize),
Bool,
String,
Array(Box<FunctionParamType>, Vec<usize>),
FixedBytes(usize),
Tuple(Vec<FunctionParamType>),
}Expand description
§FunctionParamType
The type of function parameter
Variants§
Address
An address
Bytes
Bytes
Int(usize)
A signed integer
Uint(usize)
An unsigned integer
Bool
A boolean
String
A String
Array(Box<FunctionParamType>, Vec<usize>)
Array ; uint256[2][] => Array(Uint(256), [2, 0])
FixedBytes(usize)
Fixed number of bytes
Tuple(Vec<FunctionParamType>)
A tuple of parameters
Implementations§
Source§impl FunctionParamType
impl FunctionParamType
Sourcepub fn is_memory_type(&self) -> bool
pub fn is_memory_type(&self) -> bool
Checks if the param type should be designated as “memory” for solidity interface generation.
Trait Implementations§
Source§impl Clone for FunctionParamType
impl Clone for FunctionParamType
Source§impl Debug for FunctionParamType
impl Debug for FunctionParamType
Source§impl<'de> Deserialize<'de> for FunctionParamType
impl<'de> Deserialize<'de> for FunctionParamType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FunctionParamType
impl Display for FunctionParamType
impl Eq for FunctionParamType
Source§impl From<&str> for FunctionParamType
impl From<&str> for FunctionParamType
Source§impl From<FunctionParamType> for JsValuewhere
FunctionParamType: Serialize,
impl From<FunctionParamType> for JsValuewhere
FunctionParamType: Serialize,
Source§fn from(value: FunctionParamType) -> Self
fn from(value: FunctionParamType) -> Self
Converts to this type from the input type.
Source§impl From<String> for FunctionParamType
impl From<String> for FunctionParamType
Source§impl FromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
impl FromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &FunctionParamTypewhere
FunctionParamType: Serialize,
impl IntoWasmAbi for &FunctionParamTypewhere
FunctionParamType: Serialize,
Source§impl IntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
impl IntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
Source§impl OptionFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
impl OptionIntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
Source§impl Ord for FunctionParamType
impl Ord for FunctionParamType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FunctionParamType
impl PartialEq for FunctionParamType
Source§impl PartialOrd for FunctionParamType
impl PartialOrd for FunctionParamType
Source§impl RefFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<FunctionParamType>
type Anchor = SelfOwner<FunctionParamType>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for FunctionParamType
impl Serialize for FunctionParamType
impl StructuralPartialEq for FunctionParamType
Source§impl Tsify for FunctionParamType
impl Tsify for FunctionParamType
const DECL: &'static str = "/**\n * #### FunctionParamType\n *\n * The type of function parameter\n */\nexport type FunctionParamType = \"Address\" | \"Bytes\" | { Int: number } | { Uint: number } | \"Bool\" | \"String\" | { Array: [FunctionParamType, number[]] } | { FixedBytes: number } | { Tuple: FunctionParamType[] };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for FunctionParamTypewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
impl VectorIntoWasmAbi for FunctionParamTypewhere
FunctionParamType: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for FunctionParamType
impl WasmDescribe for FunctionParamType
Auto Trait Implementations§
impl Freeze for FunctionParamType
impl RefUnwindSafe for FunctionParamType
impl Send for FunctionParamType
impl Sync for FunctionParamType
impl Unpin for FunctionParamType
impl UnsafeUnpin for FunctionParamType
impl UnwindSafe for FunctionParamType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.Source§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 32 bytes
Size for each variant:
Address: 0 bytesBytes: 0 bytesInt: 16 bytesUint: 16 bytesBool: 0 bytesString: 0 bytesArray: 32 bytesFixedBytes: 16 bytesTuple: 32 bytes