pub struct ABIEncoder {
pub function_selector: [u8; 8],
pub encoded_args: Vec<u8>,
}Fields§
§function_selector: [u8; 8]§encoded_args: Vec<u8>Implementations§
Source§impl ABIEncoder
impl ABIEncoder
pub fn new() -> ABIEncoder
pub fn new_with_fn_selector(signature: &[u8]) -> ABIEncoder
Sourcepub fn encode(&mut self, args: &[Token]) -> Result<Vec<u8>, CodecError>
pub fn encode(&mut self, args: &[Token]) -> Result<Vec<u8>, CodecError>
Encode takes an array of Tokens, encodes these tokens, and returns the
raw bytes (as a Vec
pub fn encode_function_selector(signature: &[u8]) -> [u8; 8]
Auto Trait Implementations§
impl Freeze for ABIEncoder
impl RefUnwindSafe for ABIEncoder
impl Send for ABIEncoder
impl Sync for ABIEncoder
impl Unpin for ABIEncoder
impl UnsafeUnpin for ABIEncoder
impl UnwindSafe for ABIEncoder
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, U> FlattenInto<U> for Twhere
U: FlattenFrom<T>,
impl<T, U> FlattenInto<U> for Twhere
U: FlattenFrom<T>,
fn flatten_into(self) -> U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more