pub struct HttpProvider { /* private fields */ }Expand description
A ContextProvider backed by a remote HTTP endpoint. Handshakes once on
HttpProvider::connect and caches the negotiated identity + capabilities.
Implementations§
Trait Implementations§
Source§impl ContextProvider for HttpProvider
impl ContextProvider for HttpProvider
Source§fn id(&self) -> &str
fn id(&self) -> &str
The provider’s host-facing id — its routing key and its consent key
(
06-context-protocol.md §3.5).Source§fn info(&self) -> &ProviderInfo
fn info(&self) -> &ProviderInfo
Identity + declared data-flow direction, surfaced at consent time
(§3.2, §3.5).
Source§fn capabilities(&self) -> &Capabilities
fn capabilities(&self) -> &Capabilities
Capabilities negotiated at the handshake (§3.2) — which frame kinds
and filters this provider serves, whether it upserts, does graph, is
an embedder, or supports subscriptions.
Source§fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ContextQuery,
) -> Pin<Box<dyn Future<Output = Result<ContextQueryResult, HostError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ContextQuery,
) -> Pin<Box<dyn Future<Output = Result<ContextQueryResult, HostError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Answer a context query with budgeted, provenance-carrying frames
(§3.3). The host — not the provider — enforces the budget and consent;
a provider that over-runs its budget is caught by the host, not
trusted (
crate::host).Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HostError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HostError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shut the provider down cleanly (§3.2 lifecycle). In-process providers
default to a no-op; transport-backed providers send
shutdown and
reap their child. Overridable.Auto Trait Implementations§
impl !RefUnwindSafe for HttpProvider
impl !UnwindSafe for HttpProvider
impl Freeze for HttpProvider
impl Send for HttpProvider
impl Sync for HttpProvider
impl Unpin for HttpProvider
impl UnsafeUnpin for HttpProvider
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
Mutably borrows from an owned value. Read more