Mountain/RPC/CocoonService/Output/ShowOutput.rs
1//! Show an output channel in the workbench panel via
2//! `sky://output/show`.
3
4use serde_json::json;
5use tauri::Emitter;
6use tonic::{Response, Status};
7use ::Vine::Generated::{Empty, ShowOutputRequest};
8
9use crate::RPC::CocoonService::CocoonServiceImpl;
10
11pub async fn Fn(Service:&CocoonServiceImpl, Request:ShowOutputRequest) -> Result<Response<Empty>, Status> {
12 let _ = Service
13 .environment
14 .ApplicationHandle
15 .emit("sky://output/show", json!({ "channel": Request.channel_id }));
16
17 Ok(Response::new(Empty {}))
18}