pub struct InterfaceObservation {
pub reference: InterfaceRef,
pub descriptor: InterfaceDescriptor,
pub scope_ref: Option<String>,
pub validator: Option<Validator>,
}Expand description
One atomic observation of an interface reference, descriptor, and validator.
Fields§
§reference: InterfaceRefStructured reference selected by published objects and operation calls.
descriptor: InterfaceDescriptorCanonical descriptor frozen when the interface was registered.
scope_ref: Option<String>Optional ref of the scope Object from this same observation.
validator: Option<Validator>Optional validator. Its presence makes it a required call precondition.
Implementations§
Source§impl InterfaceObservation
impl InterfaceObservation
Sourcepub fn project_operations(self, visible: impl Fn(&str) -> bool) -> Self
pub fn project_operations(self, visible: impl Fn(&str) -> bool) -> Self
Restricts this effective view to visible operations and reachable types.
Registry artifacts are unchanged. When operations are removed, interface- wide documentation is omitted because it may describe hidden operations. Providers must use the same predicate for publication and fetch.
Sourcepub fn protocol_response(&self) -> Result<FetchInterfaceResponse, ProtocolError>
pub fn protocol_response(&self) -> Result<FetchInterfaceResponse, ProtocolError>
Converts this host observation to a validated canonical protocol response.
A Host-side response construction failure is returned as Internal; it is
never emitted as a successful response for a Client to reinterpret as a
local validation error.