pub struct Method {
pub signature: &'static str,
pub returns: &'static str,
}Expand description
A function: its canonical name(types) and what it answers.
Fields§
§signature: &'static strname(t1,t2), as the selector hashes it.
returns: &'static strWhat it answers, as a parameter list: uint64 gasEstimate, uint64 gasEstimateForL1.
Implementations§
Source§impl Method
impl Method
pub const fn new(signature: &'static str, returns: &'static str) -> Method
Sourcepub fn selector(&self) -> [u8; 4]
pub fn selector(&self) -> [u8; 4]
The four bytes that name it: the start of keccak256(signature).
Trait Implementations§
impl Copy for Method
impl Eq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations§
impl Freeze for Method
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnsafeUnpin for Method
impl UnwindSafe for Method
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.