plexus-core
The core of a Plexus RPC service: the service that activations register
with, the Activation trait, dispatch, schemas, the gate that decides each
call, the in-process transport, and children mounted from another process.
Most people want plexus-rpc
plexus-rpc is the one
dependency a service takes. It brings this crate as plexus_rpc::core,
with the macros, the server and a prelude.
Install
[]
= "0.11"
= "0.11"
= "0.11"
= "0.1"
= "0.3"
= { = "0.26", = ["server", "macros"] }
= "1"
= { = "1", = ["derive"] }
= "1"
= { = "1", = ["macros", "rt"] }
= "1"
#[activation] writes code that names these crates, so each is in the
manifest.
An activation, called in process
use ;
use HubTransport;
use DynamicHub;
use JsonSchema;
use ;
use Arc;
;
/// Say things back.
async
#[activation] writes EchoClient. HubTransport::anonymous calls as
nobody, and HubTransport::as_ calls as an AuthContext. A service with a
gate (DynamicHub::with_gate) decides each call by its caller's roles.
cargo test runs this file and holds this page to it.
More
- docs.rs: the API.
- Changelog.
- Activations: hosting one, nesting, the two this crate ships.
- The service root: a top level that changes while the service serves.
- The gate: how each call is decided, and a role held on an address.
- Held calls: a call is decided again when the grants move, and ended when it does not hold.
- Keyed peers: the rules a child with a key and its service apply.
AGPL-3.0-only.