-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Milestone
Description
Currently, the invoke method takes in invocation arguments as separate function arguments. Making typical invocations look like:
client.invoke(uri, method, args, None, None)
One consideration brought up by @nerfZael is to make invocation arguments a struct, ideally something similar to:
struct InvokeArgs<T: Serialize> {
uri: Uri,
method: String,
args: Option<T>,
env: Option<&[u8]>,
resolution_context: Option<&[u8]>
}This would enable 2 main things:
- Having defaults:
client.invoke<R>(InvokeArgs {
uri: "test/hello",
method: "sayHello",
args: Some(MyArgs {...})
...Default::default()
}- Passing method args as a serializable struct and encode it for the user; instead of forcing the user to encode them outside and pass them as an array of u8
The case for methods with no arguments would need to be handled
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo