#[non_exhaustive]pub struct ProxySuccessorRequest {
pub method: Arc<str>,
pub params: Option<Arc<RawValue>>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Parameters of a proxy/successor request.
A proxy sends it to forward a message to its successor, and the conductor sends it to
deliver a message from the successor to the proxy. The envelope wraps one request: method
and params are the wrapped request’s method and params.
The result or error of the wrapped request is returned unchanged, as the same JSON value,
as the result or error of the proxy/successor request. Errors the conductor returns
itself, for example because the successor has exited, are not wrapped results.
To cancel it, the sender sends $/cancel_request with the ID of this proxy/successor
request on the same connection. Cancellation is never forwarded to another hop.
See the Proxy Chains RFD.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method: Arc<str>Method name of the wrapped request.
params: Option<Arc<RawValue>>Params of the wrapped request, forwarded unchanged.
Optional. Omitted and null are equivalent and mean the wrapped request has no params.
When present, it MUST be a JSON object or array, as JSON-RPC requires.
The wrapped request’s own _meta stays inside these params.
meta: Option<Map<String, Value>>Metadata for the proxy/successor envelope itself, separate from the wrapped
message’s _meta. It is hop-local: the conductor does not copy it into the message
it unwraps.
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Implementations§
Source§impl ProxySuccessorRequest
impl ProxySuccessorRequest
Sourcepub fn new(method: impl Into<Arc<str>>) -> ProxySuccessorRequest
pub fn new(method: impl Into<Arc<str>>) -> ProxySuccessorRequest
Builds ProxySuccessorRequest with the required fields set. Optional fields start unset or empty.
Sourcepub fn params(
self,
params: impl IntoOption<Arc<RawValue>>,
) -> ProxySuccessorRequest
pub fn params( self, params: impl IntoOption<Arc<RawValue>>, ) -> ProxySuccessorRequest
Params of the wrapped request, forwarded unchanged.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> ProxySuccessorRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> ProxySuccessorRequest
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for ProxySuccessorRequest
impl Clone for ProxySuccessorRequest
Source§fn clone(&self) -> ProxySuccessorRequest
fn clone(&self) -> ProxySuccessorRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProxySuccessorRequest
impl Debug for ProxySuccessorRequest
Source§impl<'de> Deserialize<'de> for ProxySuccessorRequest
impl<'de> Deserialize<'de> for ProxySuccessorRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxySuccessorRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProxySuccessorRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonRpcMessage for ProxySuccessorRequest
impl JsonRpcMessage for ProxySuccessorRequest
Source§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
Source§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
Source§impl JsonRpcRequest for ProxySuccessorRequest
impl JsonRpcRequest for ProxySuccessorRequest
Source§type Response = ProxySuccessorResponse
type Response = ProxySuccessorResponse
Source§impl JsonSchema for ProxySuccessorRequest
impl JsonSchema for ProxySuccessorRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more