pub fn validate(&self) -> Result<(), UnresolvedMapping> {
        let unresolved_pats: Vec<_> = collect_pat_names(&self.to)
            .difference(&collect_pat_names(&self.from))
            .map(|&p| p.to_string())
            .collect();

        if unresolved_pats.is_empty() {
            return Ok(());
        }

        Err(UnresolvedMapping {
            map: self.clone(),
            unresolved_pats,
        })
    }
/// Checks a `PatternMap` is resolvable, returning an error if it is not.
Checks a `PatternMap` is resolvable, returning an error if it is not.
Checks a ` PatternMap ` is resolvable returning an error if it is not .
pub fn validate(&self) -> Result<(), UnresolvedMapping> {
        let unresolved_pats: Vec<_> = collect_pat_names(&self.to)
            .difference(&collect_pat_names(&self.from))
            .map(|&p| p.to_string())
            .collect();
        if unresolved_pats.is_empty() {
            return Ok(());
        }
        Err(UnresolvedMapping {
            map: self.clone(),
            unresolved_pats,
        })
    }
pub fn validate ( & self ) -> Result < ( ) , UnresolvedMapping > { let unresolved_pats : Vec < _ > = collect_pat_names ( & self . to ) . difference ( & collect_pat_names ( & self . from ) ) . map ( | & p | p . to_string ( ) ) . collect ( ) ; if unresolved_pats . is_empty ( ) { return Ok ( ( ) ) ; } Err ( UnresolvedMapping { map : self . clone ( ) , unresolved_pats , } ) }
Checks a `PatternMap` is resolvable, returning an error if it is not.
Checks a ` PatternMap ` is resolvable returning an error if it is not .
&self
&self