pub struct Capability {
pub provider_id: String,
pub provider_kind: i32,
pub contract_id: String,
pub transport: i32,
pub params: Option<TransportParams>,
pub description: String,
}Expand description
Public view of one declared Capability – what shows up inside
CapabilityProvider.capabilities returned by Query. Mirrors the fields of
DeclareCapabilityRequest EXCEPT endpoint is OMITTED: endpoint
disclosure is gated behind ConnectCapability so Atlas records the
consumer->provider edge before any traffic flows. Consumers MUST
call ConnectCapability to obtain the dial-able endpoint.
provider_id / provider_kind are duplicated inside each Capability
even when it sits inside a CapabilityProvider (where the same info is on the
CapabilityProvider itself) – the cost is one extra string + one enum per cap
on the wire, and it lets consumers flatten CapabilityProvider.capabilities
into a flat Capability list without having to copy the provider info
across by hand.
Invariant: params’s oneof variant matches transport –
GRPC <-> GrpcParams, ROS2 <-> Ros2Params, MCP <-> McpParams.
Atlas enforces this at DeclareCapability time, so a Capability read
from Query is guaranteed consistent. Consumers MAY assume this and
skip a re-check.
Fields§
§provider_id: String§provider_kind: i32§contract_id: String§transport: i32§params: Option<TransportParams>§description: StringNatural-language description (see DeclareCapabilityRequest.description).
Implementations§
Source§impl Capability
impl Capability
Sourcepub fn provider_kind(&self) -> Kind
pub fn provider_kind(&self) -> Kind
Returns the enum value of provider_kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_provider_kind(&mut self, value: Kind)
pub fn set_provider_kind(&mut self, value: Kind)
Sets provider_kind to the provided enum value.
Sourcepub fn transport(&self) -> Transport
pub fn transport(&self) -> Transport
Returns the enum value of transport, or the default if the field is set to an invalid enum value.
Sourcepub fn set_transport(&mut self, value: Transport)
pub fn set_transport(&mut self, value: Transport)
Sets transport to the provided enum value.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl Default for Capability
impl Default for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl Message for Capability
impl Message for Capability
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for Capability
impl PartialEq for Capability
impl Eq for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].