elast0ny / elast0ny/wamp_async

Consider having high-level interfaces

Open
#3 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
23
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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:

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

I would prefer to have an option to write:

```rust
async fn echo(input: MyDeserializableInputType) -> Result {
}
```

And from the caller side instead of:

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

use:

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.