pub async fn command_list_statuses(
    arweave: &Arweave,
    glob_str: &str,
    log_dir: &str,
    statuses: Option<Vec<StatusCode>>,
    max_confirms: Option<&str>,
    output_format: Option<&str>,
) -> CommandResult {
    let paths_iter = glob(glob_str)?.filter_map(Result::ok);
    let log_dir = PathBuf::from(log_dir);
    let output_format = get_output_format(output_format.unwrap_or(""));
    let max_confirms = max_confirms.map(|m| m.parse::<u64>().unwrap());

    let mut counter = 0;
    for status in arweave
        .filter_statuses(paths_iter, log_dir.clone(), statuses, max_confirms)
        .await?
        .iter()
    {
        if counter == 0 {
            println!("{}", status.header_string(&output_format));
        }
        print!("{}", output_format.formatted_string(status));
        counter += 1;
    }
    if counter == 0 {
        println!("Didn't find match any statuses.");
    } else {
        println!("Found {} files matching filter criteria.", counter);
    }
    Ok(())
}
/// Lists transaction statuses, filtered by statuses and max confirmations if provided.
Lists transaction statuses, filtered by statuses and max confirmations if provided.
Lists transaction statuses filtered by statuses and max confirmations if provided .
pub async fn command_list_statuses(
    arweave: &Arweave,
    glob_str: &str,
    log_dir: &str,
    statuses: Option<Vec<StatusCode>>,
    max_confirms: Option<&str>,
    output_format: Option<&str>,
) -> CommandResult {
    let paths_iter = glob(glob_str)?.filter_map(Result::ok);
    let log_dir = PathBuf::from(log_dir);
    let output_format = get_output_format(output_format.unwrap_or(""));
    let max_confirms = max_confirms.map(|m| m.parse::<u64>().unwrap());
    let mut counter = 0;
    for status in arweave
        .filter_statuses(paths_iter, log_dir.clone(), statuses, max_confirms)
        .await?
        .iter()
    {
        if counter == 0 {
            println!("{}", status.header_string(&output_format));
        }
        print!("{}", output_format.formatted_string(status));
        counter += 1;
    }
    if counter == 0 {
        println!("Didn't find match any statuses.");
    } else {
        println!("Found {} files matching filter criteria.", counter);
    }
    Ok(())
}
pub async fn command_list_statuses ( arweave : & Arweave , glob_str : & str , log_dir : & str , statuses : Option < Vec < StatusCode > > , max_confirms : Option < & str > , output_format : Option < & str > , ) -> CommandResult { let paths_iter = glob ( glob_str ) ? . filter_map ( Result :: ok ) ; let log_dir = PathBuf :: from ( log_dir ) ; let output_format = get_output_format ( output_format . unwrap_or ( " " ) ) ; let max_confirms = max_confirms . map ( | m | m . parse :: < u64 > ( ) . unwrap ( ) ) ; let mut counter = 0 ; for status in arweave . filter_statuses ( paths_iter , log_dir . clone ( ) , statuses , max_confirms ) . await ? . iter ( ) { if counter == 0 { println ! ( " " status header_string ( output_format ) ) ; } print ! ( " " output_format formatted_string ( status ) ) ; counter += 1 ; } if counter == 0 { println ! ( " " ) ; } else { println ! ( " " counter ) ; } Ok ( ( ) ) }
Lists transaction statuses, filtered by statuses and max confirmations if provided.
Lists transaction statuses filtered by statuses and max confirmations if provided .
arweave
&Arweave
glob_str
&str
log_dir
&str
statuses
Option<Vec<StatusCode>>
max_confirms
Option<&str>
output_format
Option<&str>
arweave
&Arweave
glob_str
&str
log_dir
&str
statuses
Option<Vec<StatusCode>>
max_confirms
Option<&str>
output_format
Option<&str>