pub async fn request_artifact(
        &mut self,
        peer: &PeerId,
        hash: &str,
    ) -> Result<Vec<u8>, Box<dyn error::Error + Send>> {
        debug!("p2p::Client::request_artifact {:?}: {:?}", peer, hash);

        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::RequestArtifact {
                hash: String::from(hash),
                peer: *peer,
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
/// Request an artifact with the specified `hash` from
/// the swarm.
Request an artifact with the specified `hash` from
the swarm.
Request an artifact with the specified ` hash ` from the swarm .
pub async fn request_artifact(
        &mut self,
        peer: &PeerId,
        hash: &str,
    ) -> Result<Vec<u8>, Box<dyn error::Error + Send>> {
        debug!("p2p::Client::request_artifact {:?}: {:?}", peer, hash);
        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::RequestArtifact {
                hash: String::from(hash),
                peer: *peer,
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
pub async fn request_artifact ( & mut self , peer : & PeerId , hash : & str , ) -> Result < Vec < u8 > , Box < dyn error :: Error + Send > > { debug ! ( " " peer hash ) ; let ( sender , receiver ) = oneshot :: channel ( ) ; self . sender . send ( Command :: RequestArtifact { hash : String :: from ( hash ) , peer : * peer , sender , } ) . await . expect ( " " ) ; receiver . await . expect ( " " ) }
Request an artifact with the specified `hash` from
the swarm.
Request an artifact with the specified ` hash ` from the swarm .
&mut self
peer
&PeerId
hash
&str
&mut self
peer
&PeerId
hash
&str