pub struct MethodToken {
pub hash: [u8; 20],
pub method: String,
pub parameters_count: u16,
pub has_return_value: bool,
pub call_flags: u8,
}Expand description
Method token for cross-contract calls in NEF format.
Method tokens are used to optimize calls to other contracts by caching the target contract hash and method information in the NEF header.
Fields§
§hash: [u8; 20]Target contract hash (20 bytes, Script Hash)
method: StringMethod name to call
parameters_count: u16Number of parameters the method accepts
has_return_value: boolWhether the method returns a value
call_flags: u8Call flags (Neo N3 CallFlags bitmask; All = 0x0F)
Implementations§
Trait Implementations§
Source§impl Clone for MethodToken
impl Clone for MethodToken
Source§fn clone(&self) -> MethodToken
fn clone(&self) -> MethodToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MethodToken
impl RefUnwindSafe for MethodToken
impl Send for MethodToken
impl Sync for MethodToken
impl Unpin for MethodToken
impl UnwindSafe for MethodToken
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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