pub struct PluginInvoker { /* private fields */ }Expand description
Client for invoking sibling plugin operations through the host.
Implementations§
Source§impl PluginInvoker
impl PluginInvoker
Sourcepub async fn connect(
invocation_token: impl AsRef<str>,
) -> Result<Self, PluginInvokerError>
pub async fn connect( invocation_token: impl AsRef<str>, ) -> Result<Self, PluginInvokerError>
Connects to the plugin invoker with an invocation token from the host.
Sourcepub async fn invoke<P>(
&mut self,
plugin: &str,
operation: &str,
params: P,
options: Option<InvokeOptions>,
) -> Result<OperationResult, PluginInvokerError>where
P: Serialize,
pub async fn invoke<P>(
&mut self,
plugin: &str,
operation: &str,
params: P,
options: Option<InvokeOptions>,
) -> Result<OperationResult, PluginInvokerError>where
P: Serialize,
Invokes one operation on another plugin.
Sourcepub async fn invoke_graphql<V>(
&mut self,
plugin: &str,
document: &str,
variables: Option<V>,
options: Option<InvokeOptions>,
) -> Result<OperationResult, PluginInvokerError>where
V: Serialize,
pub async fn invoke_graphql<V>(
&mut self,
plugin: &str,
document: &str,
variables: Option<V>,
options: Option<InvokeOptions>,
) -> Result<OperationResult, PluginInvokerError>where
V: Serialize,
Invokes another plugin’s GraphQL surface.
Sourcepub async fn exchange_invocation_token(
&mut self,
grants: &[InvocationGrant],
ttl: Option<Duration>,
) -> Result<String, PluginInvokerError>
pub async fn exchange_invocation_token( &mut self, grants: &[InvocationGrant], ttl: Option<Duration>, ) -> Result<String, PluginInvokerError>
Exchanges this invocation token for a narrower child token.
Auto Trait Implementations§
impl !Freeze for PluginInvoker
impl !RefUnwindSafe for PluginInvoker
impl Send for PluginInvoker
impl Sync for PluginInvoker
impl Unpin for PluginInvoker
impl UnsafeUnpin for PluginInvoker
impl !UnwindSafe for PluginInvoker
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request