Unverified Commit d3b1b3af authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

server: Register raw method with connection ID (#1297)



* server: Add a raw method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Register raw methods, blocking or unblocking

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Add with-context attribute

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Register sync and nonblocking methods for raw API

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* examples: Add with context example

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* core: Adjust docs for the raw method registering

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Cargo fmt

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Request Arc<Context> for the raw method callback

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Per method raw-method attribute

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* examples: Add server raw method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests/ui: Check correct proc-macro behavior

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests/ui: Negative test for async with raw methods

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests/ui: Negative test for blocking with raw methods

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests/proc-macros: Ensure unique connection IDs from different clients

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* tests/integration: Ensure unique connection IDs from different clients

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Apply cargo fmt

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Register raw method as async method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Fix testing

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* core: Fix documentation

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Rename raw method to `module.register_async_with_details`

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Add connection details wrapper

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Add asyncWithDetails and connection details

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macros: Provide connection details to methods

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Update core/src/server/rpc_module.rs

Co-authored-by: default avatarNiklas Adolfsson <[email protected]>

* server: Remove connection details builder

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* server: Refactor `.register_async_with_details` to `.register_async_method_with_details`

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* proc-macro: Clarify comment

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* core: Doc hidden for async with details

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Rename example

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Update core/src/server/rpc_module.rs

Co-authored-by: default avatarNiklas Adolfsson <[email protected]>

* core: Remove doc(hidden) from ConnectionDetails::id

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* Update core/src/server/rpc_module.rs

---------

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
parent 3f16132f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment