Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust 如何从actix::Addr<;访问;A>;?_Rust_Rust Actix_Actix Web - Fatal编程技术网

Rust 如何从actix::Addr<;访问;A>;?

Rust 如何从actix::Addr<;访问;A>;?,rust,rust-actix,actix-web,Rust,Rust Actix,Actix Web,我在阅读rust文档时发现自己有点迷路,现在我无法找到从中提取a的方法,我也不知道这是否可行 重要部分: 发布结构WebsocketManager{ 酒吧客户:Vec, } implWebSocketManager{ pub fn send(&self,value:&serde_json::value,name:&String){ 如果self.clients.is_为空(){ 返回; } 让string=serde_json::to_string_pretty(value).unwrap()

我在阅读rust文档时发现自己有点迷路,现在我无法找到从中提取
a
的方法,我也不知道这是否可行

重要部分:

发布结构WebsocketManager{
酒吧客户:Vec,
}
implWebSocketManager{
pub fn send(&self,value:&serde_json::value,name:&String){
如果self.clients.is_为空(){
返回;
}
让string=serde_json::to_string_pretty(value).unwrap();
适用于客户机和自助客户机{
//let actor:WebsocketActor=client.get_websocket_actor();
//演员。re。是否匹配(姓名){
//client.do_send(StringMessage(string.clone());
//  }
}
}
}
///定义http参与者
发布结构WebsocketActor{
服务器:Arc,
酒吧名称:Regex,
}

通常不可能,但在某些情况下可能会。你想做什么不会编译?你能创建一个吗?@trentcl谢谢,我已经在正文中添加了部分代码和所需的示例。很难将整个事件作为一个简单的例子来分享,因为它涉及一堆不同的线程、板条箱等。您可能正在寻找收件人: