Trait forest_filecoin::rpc::reflect::Params
source · pub trait Params<const ARITY: usize>: HasLotusJson {
// Required methods
fn schemas(gen: &mut SchemaGenerator) -> [(Schema, bool); ARITY];
fn parse(
raw: Option<RequestParameters>,
names: [&str; ARITY],
calling_convention: ParamStructure,
n_required: usize,
) -> Result<Self, Error>
where Self: Sized;
// Provided method
fn unparse(self) -> Result<[Value; ARITY], Error> { ... }
}
Expand description
A tuple of ARITY
arguments.
This should NOT be manually implemented.
Required Methods§
sourcefn schemas(gen: &mut SchemaGenerator) -> [(Schema, bool); ARITY]
fn schemas(gen: &mut SchemaGenerator) -> [(Schema, bool); ARITY]
A Schema
and Optional::optional
schema-nullable pair for argument, in-order.
sourcefn parse(
raw: Option<RequestParameters>,
names: [&str; ARITY],
calling_convention: ParamStructure,
n_required: usize,
) -> Result<Self, Error>where
Self: Sized,
fn parse(
raw: Option<RequestParameters>,
names: [&str; ARITY],
calling_convention: ParamStructure,
n_required: usize,
) -> Result<Self, Error>where
Self: Sized,
Convert from raw request parameters, to the argument tuple required by
RpcMethod::handle
Provided Methods§
Object Safety§
This trait is not object safe.