pub async fn respond(&mut self, response: &JsonRpcResponse) -> Result<()> {
        let serialised_res = serde_json::to_string(response).map_err(|err| {
            Error::GeneralError(format!("Failed to serialise response: {:?}", err))
        })?;

        self.quinn_send_stream
            .write_all(&serialised_res.into_bytes())
            .await
            .map_err(|err| {
                Error::GeneralError(format!(
                    "Failed to write entire buffer to response stream: {}",
                    err
                ))
            })
    }
// Write a JsonRpcResponse into the current connection's sending stream
Write a JsonRpcResponse into the current connection's sending stream
Write a JsonRpcResponse into the current connection ' s sending stream
pub async fn respond(&mut self, response: &JsonRpcResponse) -> Result<()> {
        let serialised_res = serde_json::to_string(response).map_err(|err| {
            Error::GeneralError(format!("Failed to serialise response: {:?}", err))
        })?;
        self.quinn_send_stream
            .write_all(&serialised_res.into_bytes())
            .await
            .map_err(|err| {
                Error::GeneralError(format!(
                    "Failed to write entire buffer to response stream: {}",
                    err
                ))
            })
    }
pub async fn respond ( & mut self , response : & JsonRpcResponse ) -> Result < ( ) > { let serialised_res = serde_json :: to_string ( response ) . map_err ( | err | { Error :: GeneralError ( format ! ( " " err ) ) } ) ? ; self . quinn_send_stream . write_all ( & serialised_res . into_bytes ( ) ) . await . map_err ( | err | { Error :: GeneralError ( format ! ( " " err ) ) } ) }
Write a JsonRpcResponse into the current connection's sending stream
Write a JsonRpcResponse into the current connection ' s sending stream
&mut self
response
&JsonRpcResponse