/// Convert this template into a string using the matches obtained
/// from another template. If a param that's used isn't provided,
/// it's replaced with an empty string
Convert this template into a string using the matches obtained
from another template. If a param that's used isn't provided,
it's replaced with an empty string
Convert this template into a string using the matches obtained from another template . If a param that ' s used isn ' t provided it ' s replaced with an empty string
pub fn stringify<M: Matcher>(&self, matches: &M) -> String {
        let mut out = String::new();
        for piece in &self.pieces {
            match piece {
                Piece::Str(s) => {
                    out.push_str(s);
                },
                Piece::Param(name) => {
                    let m = matches.get_match(name).unwrap_or("");
                    out.push_str(m);
                }
            }
        }
        out
    }
pub fn stringify < M : Matcher > ( & self , matches : & M ) -> String { let mut out = String :: new ( ) ; for piece in & self . pieces { match piece { Piece :: Str ( s ) => { out . push_str ( s ) ; } , Piece :: Param ( name ) => { let m = matches . get_match ( name ) . unwrap_or ( " " ) ; out . push_str ( m ) ; } } } out }
Convert this template into a string using the matches obtained
from another template.
Convert this template into a string using the matches obtained from another template .
&self
matches
&M