pub enum Executor {
Client(Arc<MykoClient>),
InProcess(Arc<CellServerCtx>),
}Expand description
How MCP dispatch reaches the underlying Myko queries / reports / commands.
Variants§
Client(Arc<MykoClient>)
Talk to a remote Myko server over WebSocket via a MykoClient.
InProcess(Arc<CellServerCtx>)
Talk to a server hosted in the same process via its CellServerCtx.
Implementations§
Source§impl Executor
impl Executor
Sourcepub async fn execute_query(
&self,
query_id: &str,
args: Value,
) -> Result<Value, String>
pub async fn execute_query( &self, query_id: &str, args: Value, ) -> Result<Value, String>
Execute a query and return its current items as JSON.
Sourcepub async fn execute_report(
&self,
report_id: &str,
args: Value,
) -> Result<Value, String>
pub async fn execute_report( &self, report_id: &str, args: Value, ) -> Result<Value, String>
Execute a report and return its current output as JSON.
Sourcepub async fn execute_view(
&self,
view_id: &str,
args: Value,
) -> Result<Value, String>
pub async fn execute_view( &self, view_id: &str, args: Value, ) -> Result<Value, String>
Execute a view (list-typed report) and return its current items as JSON.
Sourcepub async fn execute_command(
&self,
command_id: &str,
args: Value,
) -> Result<Value, String>
pub async fn execute_command( &self, command_id: &str, args: Value, ) -> Result<Value, String>
Execute a command and return its result as JSON.
Sourcepub fn connection_status(&self) -> Value
pub fn connection_status(&self) -> Value
Status string for the built-in connection_status tool.
Auto Trait Implementations§
impl !RefUnwindSafe for Executor
impl !UnwindSafe for Executor
impl Freeze for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
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> 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