pub fn slugify_filename(url: &str, prefix: &str, suffix: &str) -> String {
    log::trace!("enter: slugify({:?}, {:?}, {:?})", url, prefix, suffix);

    let ts = SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .unwrap_or_else(|_| Duration::from_secs(0))
        .as_secs();

    let altered_prefix = if !prefix.is_empty() {
        format!("{}-", prefix)
    } else {
        String::new()
    };

    let slug = url.replace("://", "_").replace("/", "_").replace(".", "_");

    let filename = format!("{}{}-{}.{}", altered_prefix, slug, ts, suffix);

    log::trace!("exit: slugify -> {}", filename);
    filename
}
/// given a url and filename-suffix, return a unique filename comprised of the slugified url,
/// current unix timestamp and suffix
///
/// ex: ferox-http_telsa_com-1606947491.state
given a url and filename-suffix, return a unique filename comprised of the slugified url,
current unix timestamp and suffix


given a url and filename - suffix return a unique filename comprised of the slugified url current unix timestamp and suffix
pub fn slugify_filename(url: &str, prefix: &str, suffix: &str) -> String {
    log::trace!("enter: slugify({:?}, {:?}, {:?})", url, prefix, suffix);
    let ts = SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .unwrap_or_else(|_| Duration::from_secs(0))
        .as_secs();
    let altered_prefix = if !prefix.is_empty() {
        format!("{}-", prefix)
    } else {
        String::new()
    };
    let slug = url.replace("://", "_").replace("/", "_").replace(".", "_");
    let filename = format!("{}{}-{}.{}", altered_prefix, slug, ts, suffix);
    log::trace!("exit: slugify -> {}", filename);
    filename
}
pub fn slugify_filename ( url : & str , prefix : & str , suffix : & str ) -> String { log :: trace ! ( " " url prefix suffix ) ; let ts = SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . unwrap_or_else ( | _ | Duration :: from_secs ( 0 ) ) . as_secs ( ) ; let altered_prefix = if ! prefix . is_empty ( ) { format ! ( " " prefix ) } else { String :: new ( ) } ; let slug = url . replace ( " " , " " ) . replace ( " " , " " ) . replace ( " " , " " ) ; let filename = format ! ( " " altered_prefix slug ts suffix ) ; log :: trace ! ( " " filename ) ; filename }
given a url and filename-suffix, return a unique filename comprised of the slugified url,
current unix timestamp and suffix
given a url and filename - suffix return a unique filename comprised of the slugified url current unix timestamp and suffix
url
&str
prefix
&str
suffix
&str