pub struct SubscribeOptions {
pub scope: Option<ScopeSelector>,
pub priority: Priority,
pub admission_class: AdmissionClass,
pub event_buffer: usize,
pub route_retry: RetryBackoff,
pub route_retry_deadline: Duration,
pub route_open_timeout: Duration,
pub consumer_identity: Option<ConsumerIdentity>,
pub reverse_requests: ReverseRequestRegistry,
pub role_versions: Option<BTreeMap<String, String>>,
}Expand description
Options for SubcConsumer::subscribe.
Fields§
§scope: Option<ScopeSelector>Scope for the cached route and its reopen attempts. Defaults to None.
Cache separation and daemon refusals follow CallOptions::scope.
SubcConsumer::subscribe_route rejects this option because its handle
already fixes the scope. A scope-related close ends the subscription;
it is not automatically reopened under this or any other selector.
priority: Priority§admission_class: AdmissionClassAdmission behavior stamped into the subscription request. Defaults to NORMAL.
event_buffer: usizeMaximum number of events buffered for the caller before the subscription is dropped.
The reader task never awaits a slow event consumer; if this bounded channel fills,
closed() resolves with CallError::SubscriptionBackpressure.
route_retry: RetryBackoff§route_retry_deadline: DurationMaximum real-time limit for retrying route.open attempts when the target is temporarily absent.
route_open_timeout: DurationDeadline for opening the managed route and queuing the held-open request. The subscription itself has no response timeout once the request is sent.
consumer_identity: Option<ConsumerIdentity>Explicit consumer identity for route.open; when absent, the supervised
launch identity is used, except on SubcConsumer::connect_operator_app
connections, which omit implicit identity.
Claim-bound connections reject legacy nonce identity overrides as not sent.
reverse_requests: ReverseRequestRegistryReverse-request handlers plus extra capability strings added with
Self::with_consumer_capability. For example, tool-result/v1 declares
tool-provider content-result support. These declarations are unverified
and grant nothing; both sets are merged and omitted when empty.
role_versions: Option<BTreeMap<String, String>>The role versions declared on the subscription’s route; see
CallOptions::role_versions.
Implementations§
Source§impl SubscribeOptions
impl SubscribeOptions
Sourcepub fn with_consumer_capability(
self,
capability: impl Into<String>,
) -> Result<Self, ConsumerCapabilityError>
pub fn with_consumer_capability( self, capability: impl Into<String>, ) -> Result<Self, ConsumerCapabilityError>
Add a provider-contract capability declaration to the subscription route.
This merges with reverse-request families. For example, tool-result/v1
declares the tool-provider content result format. The declaration is
unverified and grants no privilege; invalid values are refused before
route.open is sent.
Sourcepub fn consumer_capabilities(&self) -> Vec<String>
pub fn consumer_capabilities(&self) -> Vec<String>
The extra capability strings added with with_consumer_capability, not
the reverse-request handler families. For example, tool-result/v1 declares
tool-provider content-result support; declarations are unverified and
grant nothing.