pub struct Getters(/* private fields */);Expand description
The view functions of a contract ABI, by selector.
Implementations§
Source§impl Getters
impl Getters
Sourcepub fn from_abi(abi: &Value) -> Self
pub fn from_abi(abi: &Value) -> Self
From an artifact’s abi array (forge / hardhat / solc output).
Functions that are not view/pure, or whose inputs are not
static single-word types, are skipped: they can never be getters.
Sourcepub fn from_artifact_json(v: &Value) -> Self
pub fn from_artifact_json(v: &Value) -> Self
From a whole artifact ({ "abi": [...] , ... }); empty if it has none.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Getters
impl RefUnwindSafe for Getters
impl Send for Getters
impl Sync for Getters
impl Unpin for Getters
impl UnsafeUnpin for Getters
impl UnwindSafe for Getters
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