pub async fn list_workers(&self) -> Result<Vec<Address>> {
        let (msg, mut reply_rx) = NodeMessage::list_workers();

        match self.sender.send(msg).await {
            Ok(()) => {
                if let Some(NodeReply::Workers(list)) = reply_rx.recv().await {
                    Ok(list)
                } else {
                    Ok(vec![])
                }
            }
            Err(_e) => Err(Error::FailedListWorker.into()),
        }
    }
/// Return a list of all available worker addresses on a node
Return a list of all available worker addresses on a node
Return a list of all available worker addresses on a node
pub async fn list_workers(&self) -> Result<Vec<Address>> {
        let (msg, mut reply_rx) = NodeMessage::list_workers();
        match self.sender.send(msg).await {
            Ok(()) => {
                if let Some(NodeReply::Workers(list)) = reply_rx.recv().await {
                    Ok(list)
                } else {
                    Ok(vec![])
                }
            }
            Err(_e) => Err(Error::FailedListWorker.into()),
        }
    }
pub async fn list_workers ( & self ) -> Result < Vec < Address > > { let ( msg , mut reply_rx ) = NodeMessage :: list_workers ( ) ; match self . sender . send ( msg ) . await { Ok ( ( ) ) => { if let Some ( NodeReply :: Workers ( list ) ) = reply_rx . recv ( ) . await { Ok ( list ) } else { Ok ( vec ! [ ] ) } } Err ( _e ) => Err ( Error :: FailedListWorker . into ( ) ) , } }
Return a list of all available worker addresses on a node
Return a list of all available worker addresses on a node
&self
&self