Enum ethane_abi::Parameter [−][src]
pub enum Parameter { Address(H256), Bool(H256), Int(H256, usize), Uint(H256, usize), String(Vec<u8>), Bytes(Vec<u8>), FixedBytes(Vec<u8>), Array(Vec<Parameter>), FixedArray(Vec<Parameter>), Tuple(Vec<Parameter>), }
Expand description
An ABI function parameter type enclosing the underlying numeric data bytes.
Variants
Address(H256)
Bool(H256)
Implementations
impl Parameter
[src]
impl Parameter
[src]pub fn static_encode(&self) -> Vec<u8>
[src]
pub fn static_encode(&self) -> Vec<u8>
[src]Encodes strictly the data part of the underlying type.
It will not check whether the parameter is dynamic or not, it simply encodes the enclosed data in place. For some types, it first writes the number of elements of the data in bytes. For further info, check the Solidity contract ABI specification.
pub fn is_dynamic(&self) -> bool
[src]
pub fn is_dynamic(&self) -> bool
[src]Recursively checks wether a given parameter is dynamic.
For example, a Tuple
can be dynamic if any of its
contained types are dynamic. Additionally, a
FixedArray
is static if it contains values
with static type and dynamic otherwise.
pub fn decode(parameter_type: &ParameterType, raw_bytes: &[u8]) -> (Self, usize)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more