pub struct Channel<C: ChannelContract = Mcp> {
pub provider_id: String,
pub contract_id: String,
pub transport: Transport,
pub endpoint: String,
pub channel_id: String,
pub params: TransportParams,
/* private fields */
}Expand description
One capability execution and its initialized communication resources.
Fields§
§provider_id: StringAtlas identity of the provider executing the capability.
contract_id: StringContract bound to this execution.
transport: TransportCommunication transport selected when allocating this channel.
endpoint: StringAuthoritative endpoint returned by Atlas.
channel_id: StringAtlas allocation retained until execution termination is confirmed.
params: TransportParamsTransport metadata returned by Atlas.
Implementations§
Source§impl<C: ChannelContract> Channel<C>
impl<C: ChannelContract> Channel<C>
pub fn is_async(&self) -> bool
pub fn run_id(&self) -> Option<String>
pub fn is_terminal(&self) -> bool
pub fn is_closed(&self) -> bool
Sourcepub async fn call(&self, request: C::Input) -> Result<C::Output>
pub async fn call(&self, request: C::Input) -> Result<C::Output>
Submit one execution; dropping its waiter retains completion tracking.
pub async fn status(&self) -> Result<C::StatusResponse>
pub async fn cancel(&self) -> Result<C::CancelResponse>
Sourcepub async fn close(&self) -> Result<()>
pub async fn close(&self) -> Result<()>
Cancel active work and wait up to five seconds for confirmed termination.
pub fn close_with_timeout( &self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Trait Implementations§
Auto Trait Implementations§
impl<C = Mcp> !RefUnwindSafe for Channel<C>
impl<C = Mcp> !UnwindSafe for Channel<C>
impl<C> Freeze for Channel<C>
impl<C> Send for Channel<C>
impl<C> Sync for Channel<C>
impl<C> Unpin for Channel<C>where
C: Unpin,
impl<C> UnsafeUnpin for Channel<C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].