pub struct NativeRequestHandle<C: RequestCapability> { /* private fields */ }Expand description
Typed, immutable native Capability endpoints materialized before App boot completes.
Implementations§
Source§impl<C: RequestCapability> NativeRequestHandle<C>
impl<C: RequestCapability> NativeRequestHandle<C>
Sourcepub fn binding_count(&self) -> usize
pub fn binding_count(&self) -> usize
Returns the number of provider endpoints captured by this handle.
Sourcepub async fn invoke(
&self,
operation: &str,
request: C::Request,
) -> Result<Result<C::Response, C::DomainError>, RuntimeFailure>
pub async fn invoke( &self, operation: &str, request: C::Request, ) -> Result<Result<C::Response, C::DomainError>, RuntimeFailure>
Invokes a singular Capability binding without falling back across providers.
Sourcepub async fn invoke_with_context(
&self,
operation: &str,
context: InvocationContext,
request: C::Request,
) -> Result<Result<C::Response, C::DomainError>, RuntimeFailure>
pub async fn invoke_with_context( &self, operation: &str, context: InvocationContext, request: C::Request, ) -> Result<Result<C::Response, C::DomainError>, RuntimeFailure>
Invokes a singular binding with an explicit Invocation Context.
Sourcepub async fn invoke_many(
&self,
operation: &str,
request: C::Request,
) -> Result<Vec<Result<C::Response, C::DomainError>>, RuntimeFailure>
pub async fn invoke_many( &self, operation: &str, request: C::Request, ) -> Result<Vec<Result<C::Response, C::DomainError>>, RuntimeFailure>
Invokes every provider in the resolved many order with the same typed request.
Sourcepub async fn invoke_many_with_context(
&self,
operation: &str,
context: InvocationContext,
request: C::Request,
) -> Result<Vec<Result<C::Response, C::DomainError>>, RuntimeFailure>
pub async fn invoke_many_with_context( &self, operation: &str, context: InvocationContext, request: C::Request, ) -> Result<Vec<Result<C::Response, C::DomainError>>, RuntimeFailure>
Invokes every provider with one shared explicit Invocation Context.
Sourcepub fn invocation_context(
&self,
deadline: Option<Duration>,
cancellation: CancellationToken,
) -> InvocationContext
pub fn invocation_context( &self, deadline: Option<Duration>, cancellation: CancellationToken, ) -> InvocationContext
Creates a fresh context for a request started through this handle.
Trait Implementations§
Auto Trait Implementations§
impl<C> !RefUnwindSafe for NativeRequestHandle<C>
impl<C> !Send for NativeRequestHandle<C>
impl<C> !Sync for NativeRequestHandle<C>
impl<C> !UnwindSafe for NativeRequestHandle<C>
impl<C> Freeze for NativeRequestHandle<C>
impl<C> Unpin for NativeRequestHandle<C>
impl<C> UnsafeUnpin for NativeRequestHandle<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