pub trait Params<const ARITY: usize>: HasLotusJson {
// Required methods
fn schemas(g: &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(g: &mut SchemaGenerator) -> [(Schema, bool); ARITY]
fn schemas(g: &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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.