pub async fn handshake(&mut self) -> Result<(), Error> {
        let request = HandshakeRequest {
            protocol_version: 0,
            payload: rand::thread_rng().gen::<[u8; 16]>().to_vec(),
        };
        let mut response = self
            .inner
            .handshake(stream::iter(vec![request.clone()]))
            .await?
            .into_inner();
        if request.payload.eq(&response
            .next()
            .await
            .ok_or(Error::HandshakeFailed)??
            .payload)
        {
            Result::Ok(())
        } else {
            Result::Err(Error::HandshakeFailed)
        }
    }
/// Perform a handshake with the server, as defined by the Arrow Flight API.
Perform a handshake with the server, as defined by the Arrow Flight API.
Perform a handshake with the server as defined by the Arrow Flight API .
pub async fn handshake(&mut self) -> Result<(), Error> {
        let request = HandshakeRequest {
            protocol_version: 0,
            payload: rand::thread_rng().gen::<[u8; 16]>().to_vec(),
        };
        let mut response = self
            .inner
            .handshake(stream::iter(vec![request.clone()]))
            .await?
            .into_inner();
        if request.payload.eq(&response
            .next()
            .await
            .ok_or(Error::HandshakeFailed)??
            .payload)
        {
            Result::Ok(())
        } else {
            Result::Err(Error::HandshakeFailed)
        }
    }
pub async fn handshake ( & mut self ) -> Result < ( ) , Error > { let request = HandshakeRequest { protocol_version : 0 , payload : rand :: thread_rng ( ) . gen :: < [ u8 ; 16 ] > ( ) . to_vec ( ) , } ; let mut response = self . inner . handshake ( stream :: iter ( vec ! [ request clone ( ) ] ) ) . await ? . into_inner ( ) ; if request . payload . eq ( & response . next ( ) . await . ok_or ( Error :: HandshakeFailed ) ? ? . payload ) { Result :: Ok ( ( ) ) } else { Result :: Err ( Error :: HandshakeFailed ) } }
Perform a handshake with the server, as defined by the Arrow Flight API.
Perform a handshake with the server as defined by the Arrow Flight API .
&mut self
&mut self