Skip to content

Consider having high-level interfacesΒ #3

@frol

Description

@frol

I think, we should be able to use RawValue instead of a parsed Value (see #2), and thus avoid unnecessary deserialization (see https://github.com/pandaman64/serde-query/). I would also like to have a more high-level interface to kwargs, so instead of:

async fn echo(args: Option<WampArgs>, kwargs: Option<WampKwArgs>) -> Result<(Option<WampArgs>, Option<WampKwArgs>), WampError> {
}

I would prefer to have an option to write:

async fn echo(input: MyDeserializableInputType) -> Result<MySerializableOutputType, WampError> {
}

And from the caller side instead of:

let (Some(positional_args), Some(keyword_args)) = client.call("peer.echo", args, kwargs).await?;

use:

let result = client.call("peer.echo", my_serializable_struct).await?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions