pub struct CliCommandExecutor { /* private fields */ }Expand description
In-process executor. Owns a Context and dispatches each
CommandRequest through the CLI’s local root dispatcher.
Implementations§
Trait Implementations§
Source§impl CommandExecutor for CliCommandExecutor
impl CommandExecutor for CliCommandExecutor
type Error = Error
type Stream<T> = Pin<Box<dyn Stream<Item = Result<T, <CliCommandExecutor as CommandExecutor>::Error>> + Send>> where T: Send + 'static
async fn execute<R, T>( &self, request: R, agent_arguments: Option<&AgentArguments>, ) -> Result<Self::Stream<T>, Self::Error>
Source§async fn execute_one<R, T>(
&self,
request: R,
agent_arguments: Option<&AgentArguments>,
) -> Result<T, Self::Error>
async fn execute_one<R, T>( &self, request: R, agent_arguments: Option<&AgentArguments>, ) -> Result<T, Self::Error>
Convenience for unary commands: run the request and resolve the
first item from the stream. Implementations should error with
their own “empty stream” variant if the stream closes without
producing an item.
Auto Trait Implementations§
impl !RefUnwindSafe for CliCommandExecutor
impl !UnwindSafe for CliCommandExecutor
impl Freeze for CliCommandExecutor
impl Send for CliCommandExecutor
impl Sync for CliCommandExecutor
impl Unpin for CliCommandExecutor
impl UnsafeUnpin for CliCommandExecutor
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more