Struct alloy_json_abi::Function
source · #[repr(C)]pub struct Function {
pub name: String,
pub inputs: Vec<Param>,
pub outputs: Vec<Param>,
pub state_mutability: StateMutability,
}
Expand description
A JSON ABI function.
Fields§
§name: String
The name of the function.
inputs: Vec<Param>
The input types of the function. May be empty.
outputs: Vec<Param>
The output types of the function. May be empty.
state_mutability: StateMutability
The state mutability of the function.
Implementations§
source§impl Function
impl Function
sourcepub fn signature(&self) -> String
pub fn signature(&self) -> String
Returns this function’s signature: $name($($inputs),*)
.
This is the preimage input used to compute the selector.
sourcepub fn signature_full(&self) -> String
pub fn signature_full(&self) -> String
Returns this function’s full signature:
$name($($inputs),*)($(outputs),*)
.
This is the same as signature
, but also includes
the output types.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Function
impl PartialEq for Function
impl Eq for Function
impl StructuralEq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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