pub struct RpcServerBuilder { /* private fields */ }Expand description
Fluent builder for RpcServer with describe/identity/version knobs.
Implementations§
Source§impl RpcServerBuilder
impl RpcServerBuilder
pub fn server_id(self, id: impl Into<String>) -> Self
pub fn server_version(self, v: impl Into<String>) -> Self
pub fn protocol_name(self, name: impl Into<String>) -> Self
Sourcepub fn protocol_version(self, v: impl Into<String>) -> Self
pub fn protocol_version(self, v: impl Into<String>) -> Self
Operator-supplied free-form protocol-contract version label, reported
in access-log records as protocol_version. Complementary to
(build) server_version.
pub fn enable_describe(self, enabled: bool) -> Self
pub fn with_hook(self, hook: Arc<dyn DispatchHook>) -> Self
Sourcepub fn on_serve_start(self, hook: ServeStartHook) -> Self
pub fn on_serve_start(self, hook: ServeStartHook) -> Self
Register a one-shot lifecycle hook fired before the first
request is dispatched on each (kind, capabilities) combination.
Mirrors Python’s on_serve_start duck-typed protocol.
The hook runs synchronously on the thread that first observes
the transport binding. Subsequent calls to
RpcServer::notify_transport with the same (kind, caps)
are no-ops; calls with a different combination re-fire the hook
(matches Python’s behaviour for test paths that re-bind).
Sourcepub fn with_external_location(self, cfg: ExternalLocationConfig) -> Self
pub fn with_external_location(self, cfg: ExternalLocationConfig) -> Self
Enable automatic externalization of large unary results and stream
output batches. Feature-gated on http (where the compression +
fetcher deps already live).