fn output(&self, languageId: Option<&str>, id: rpc::Id, result: Result<Value>) -> Result<()> {
        let response = match result {
            Ok(ok) => rpc::Output::Success(rpc::Success {
                jsonrpc: Some(rpc::Version::V2),
                id,
                result: ok,
            }),
            Err(err) => rpc::Output::Failure(rpc::Failure {
                jsonrpc: Some(rpc::Version::V2),
                id,
                error: err.to_rpc_error(),
            }),
        };

        let message = serde_json::to_string(&response)?;
        info!("=> {}", message);
        self.write(languageId, &message)?;
        Ok(())
    }
/// Write an RPC call output.
Write an RPC call output.
Write an RPC call output .
fn output(&self, languageId: Option<&str>, id: rpc::Id, result: Result<Value>) -> Result<()> {
        let response = match result {
            Ok(ok) => rpc::Output::Success(rpc::Success {
                jsonrpc: Some(rpc::Version::V2),
                id,
                result: ok,
            }),
            Err(err) => rpc::Output::Failure(rpc::Failure {
                jsonrpc: Some(rpc::Version::V2),
                id,
                error: err.to_rpc_error(),
            }),
        };
        let message = serde_json::to_string(&response)?;
        info!("=> {}", message);
        self.write(languageId, &message)?;
        Ok(())
    }
fn output ( & self , languageId : Option < & str > , id : rpc :: Id , result : Result < Value > ) -> Result < ( ) > { let response = match result { Ok ( ok ) => rpc :: Output :: Success ( rpc :: Success { jsonrpc : Some ( rpc :: Version :: V2 ) , id , result : ok , } ) , Err ( err ) => rpc :: Output :: Failure ( rpc :: Failure { jsonrpc : Some ( rpc :: Version :: V2 ) , id , error : err . to_rpc_error ( ) , } ) , } ; let message = serde_json :: to_string ( & response ) ? ; info ! ( " " message ) ; self . write ( languageId , & message ) ? ; Ok ( ( ) ) }
Write an RPC call output.
Write an RPC call output .
&self
languageId
Option<&str>
id
rpc::Id
result
Result<Value>
&self
languageId
Option<&str>
id
rpc::Id
result
Result<Value>