pub async fn parse_and_pretty_from_file<P, R, O>(
    out: std::sync::Arc<O>,
    client: &mut Client<String>,
    file_path: P,
) -> Result<(), CliError>
where
    P: AsRef<Path>,
    R: DeserializeOwned + Request,
    R::Response: Serialize,
    O: Terminal,
{
    let file_str: String = read_to_string(file_path)?;
    let request: R = serde_json::from_str(&file_str)
        .map_err(|err| IoError::new(ErrorKind::InvalidData, format!("{}", err)))?;

    pretty_pretty_spu(out, client, request).await
}
/// Parse from file and return Request object
Parse from file and return Request object
Parse from file and return Request object
pub async fn parse_and_pretty_from_file<P, R, O>(
    out: std::sync::Arc<O>,
    client: &mut Client<String>,
    file_path: P,
) -> Result<(), CliError>
where
    P: AsRef<Path>,
    R: DeserializeOwned + Request,
    R::Response: Serialize,
    O: Terminal,
{
    let file_str: String = read_to_string(file_path)?;
    let request: R = serde_json::from_str(&file_str)
        .map_err(|err| IoError::new(ErrorKind::InvalidData, format!("{}", err)))?;
    pretty_pretty_spu(out, client, request).await
}
pub async fn parse_and_pretty_from_file < P , R , O > ( out : std :: sync :: Arc < O > , client : & mut Client < String > , file_path : P , ) -> Result < ( ) , CliError > where P : AsRef < Path > , R : DeserializeOwned + Request , R :: Response : Serialize , O : Terminal , { let file_str : String = read_to_string ( file_path ) ? ; let request : R = serde_json :: from_str ( & file_str ) . map_err ( | err | IoError :: new ( ErrorKind :: InvalidData , format ! ( " " err ) ) ) ? ; pretty_pretty_spu ( out , client , request ) . await }
Parse from file and return Request object
Parse from file and return Request object
out
std::sync::Arc<O>
client
&mut Client<String>
file_path
P
out
std::sync::Arc<O>
client
&mut Client<String>
file_path
P