pub struct MethodMessenger<T: Hasher> { /* private fields */ }Expand description
Utility to invoke standard methods on deployed actors.
Implementations§
Source§impl<T: Hasher> MethodMessenger<T>
impl<T: Hasher> MethodMessenger<T>
Sourcepub fn new(hasher: T) -> Self
pub fn new(hasher: T) -> Self
Creates a new method messenger using a specified hashing function (blake2b by default).
Sourcepub fn call_method(
&self,
to: &Address,
method: &str,
params: Option<IpldBlock>,
value: TokenAmount,
) -> Result<Response, MethodMessengerError>
pub fn call_method( &self, to: &Address, method: &str, params: Option<IpldBlock>, value: TokenAmount, ) -> Result<Response, MethodMessengerError>
Calls a method (by name) on a specified actor by constructing and publishing the underlying on-chain message.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MethodMessenger<T>where
T: Freeze,
impl<T> RefUnwindSafe for MethodMessenger<T>where
T: RefUnwindSafe,
impl<T> Send for MethodMessenger<T>where
T: Send,
impl<T> Sync for MethodMessenger<T>where
T: Sync,
impl<T> Unpin for MethodMessenger<T>where
T: Unpin,
impl<T> UnsafeUnpin for MethodMessenger<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MethodMessenger<T>where
T: UnwindSafe,
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