Expand description
rapace-registry: Service registry with schema support for rapace RPC.
This crate provides a registry for RPC services that stores:
- Service names and IDs
- Method names and IDs
- Request/response schemas (via facet shapes)
- Supported encodings per method
§Example
ⓘ
use rapace_registry::{ServiceRegistry, ServiceEntry, MethodEntry, Encoding};
let mut registry = ServiceRegistry::new();
// Register services (usually done via macro-generated code)
Adder::register(&mut registry);
// Lookup methods by name
if let Some(method) = registry.lookup_method("Adder", "add") {
println!("method_id: {}", method.id.0);
}Structs§
- ArgInfo
- Information about an argument to an RPC method.
- Method
Entry - Information about a single RPC method.
- Method
Id - A unique identifier for a method within a registry.
- Service
Builder - Builder for registering methods on a service.
- Service
Entry - Information about an RPC service.
- Service
Id - A unique identifier for a service within a registry.
- Service
Registry - A registry of RPC services and their methods.
Enums§
- Encoding
- Supported wire encodings for RPC payloads.