pub struct SmcpComputerClient { /* private fields */ }Expand description
SMCP Computer Socket.IO客户端 SMCP Computer Socket.IO client
Implementations§
Source§impl SmcpComputerClient
impl SmcpComputerClient
Sourcepub async fn new(
url: &str,
manager: Arc<RwLock<Option<MCPServerManager>>>,
computer_name: String,
auth_secret: Option<String>,
inputs: Arc<RwLock<HashMap<String, MCPServerInput>>>,
) -> ComputerResult<Self>
pub async fn new( url: &str, manager: Arc<RwLock<Option<MCPServerManager>>>, computer_name: String, auth_secret: Option<String>, inputs: Arc<RwLock<HashMap<String, MCPServerInput>>>, ) -> ComputerResult<Self>
创建新的Socket.IO客户端 Create a new Socket.IO client
Sourcepub async fn join_office(&self, office_id: &str) -> ComputerResult<()>
pub async fn join_office(&self, office_id: &str) -> ComputerResult<()>
加入Office(Socket.IO Room) Join an Office (Socket.IO Room)
Sourcepub async fn get_current_office_id(&self) -> ComputerResult<String>
pub async fn get_current_office_id(&self) -> ComputerResult<String>
获取当前Office ID / Get current Office ID
Sourcepub async fn leave_office(&self, office_id: &str) -> ComputerResult<()>
pub async fn leave_office(&self, office_id: &str) -> ComputerResult<()>
离开Office Leave an Office
Sourcepub async fn emit_update_config(&self) -> ComputerResult<()>
pub async fn emit_update_config(&self) -> ComputerResult<()>
发送配置更新通知 Emit config update notification
Sourcepub async fn emit_update_tool_list(&self) -> ComputerResult<()>
pub async fn emit_update_tool_list(&self) -> ComputerResult<()>
发送工具列表更新通知 Emit tool list update notification
Sourcepub async fn emit_update_desktop(&self) -> ComputerResult<()>
pub async fn emit_update_desktop(&self) -> ComputerResult<()>
发送桌面更新通知 Emit desktop update notification
Sourcepub async fn disconnect(self) -> ComputerResult<()>
pub async fn disconnect(self) -> ComputerResult<()>
断开连接 Disconnect from server
Sourcepub async fn get_office_id(&self) -> Option<String>
pub async fn get_office_id(&self) -> Option<String>
获取当前office ID Get current office ID
Sourcepub fn get_namespace(&self) -> String
pub fn get_namespace(&self) -> String
获取连接的 namespace Get connected namespace
Auto Trait Implementations§
impl Freeze for SmcpComputerClient
impl !RefUnwindSafe for SmcpComputerClient
impl Send for SmcpComputerClient
impl Sync for SmcpComputerClient
impl Unpin for SmcpComputerClient
impl UnsafeUnpin for SmcpComputerClient
impl !UnwindSafe for SmcpComputerClient
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 moreSource§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.