sl4f_lib/tracing/
commands.rs1use crate::server::Facade;
6use crate::tracing::facade::TracingFacade;
7use crate::tracing::types::TracingMethod;
8use anyhow::Error;
9use async_trait::async_trait;
10use serde_json::Value;
11
12#[async_trait(?Send)]
13impl Facade for TracingFacade {
14 async fn handle_request(&self, method: String, args: Value) -> Result<Value, Error> {
15 match method.parse()? {
16 TracingMethod::Initialize => self.initialize(args).await,
17 TracingMethod::Start => self.start().await,
18 TracingMethod::Stop => self.stop().await,
19 TracingMethod::Terminate => self.terminate(args).await,
20 }
21 }
22}