pub trait RemoteInvoker {
type Call<R>;
type View<R>;
// Required methods
fn call<R, A>(
&self,
target: &ContractAddress,
method: RemoteMethod,
args: &A,
) -> Self::Call<R>
where R: ReadXDROwned,
A: WriteXDR + ?Sized;
fn view<R, A>(
&self,
target: &ContractAddress,
method: RemoteMethod,
args: &A,
) -> Self::View<R>
where R: ReadXDROwned,
A: WriteXDR + ?Sized;
}Expand description
Prepares invocations of deployed contracts for a remote proxy.
The proxy routes pure and readOnly methods to view
and every other method, including those without a declared effect, to
call. args holds the method’s arguments: the single
argument itself, or a tuple of several. Implementations encode it before
returning, since the prepared invocation cannot borrow it.
Required Associated Types§
Required Methods§
Sourcefn call<R, A>(
&self,
target: &ContractAddress,
method: RemoteMethod,
args: &A,
) -> Self::Call<R>
fn call<R, A>( &self, target: &ContractAddress, method: RemoteMethod, args: &A, ) -> Self::Call<R>
Prepare an invocation of method on target.
Sourcefn view<R, A>(
&self,
target: &ContractAddress,
method: RemoteMethod,
args: &A,
) -> Self::View<R>
fn view<R, A>( &self, target: &ContractAddress, method: RemoteMethod, args: &A, ) -> Self::View<R>
Prepare a read of method on target.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".