pub fn parse_field_separators(
    string_representations: &[String],
) -> Result<ByteTrie, InvalidFieldSeparatorError> {
    let mut separators = ByteTrie::new();

    for string_representation in string_representations {
        match field_separator(string_representation.as_str(), &mut separators).finish() {
            Err(error) => return Err(InvalidFieldSeparatorError(error.input.to_owned())),
            Ok((unconsumed_input, _)) if separators.is_empty() && !unconsumed_input.is_empty() => {
                return Err(InvalidFieldSeparatorError(unconsumed_input.to_owned()))
            }
            _ => (),
        }
    }

    Ok(separators)
}
/// Parses field separators from a string.
Parses field separators from a string.
Parses field separators from a string .
pub fn parse_field_separators(
    string_representations: &[String],
) -> Result<ByteTrie, InvalidFieldSeparatorError> {
    let mut separators = ByteTrie::new();
    for string_representation in string_representations {
        match field_separator(string_representation.as_str(), &mut separators).finish() {
            Err(error) => return Err(InvalidFieldSeparatorError(error.input.to_owned())),
            Ok((unconsumed_input, _)) if separators.is_empty() && !unconsumed_input.is_empty() => {
                return Err(InvalidFieldSeparatorError(unconsumed_input.to_owned()))
            }
            _ => (),
        }
    }
    Ok(separators)
}
pub fn parse_field_separators ( string_representations : & [ String ] , ) -> Result < ByteTrie , InvalidFieldSeparatorError > { let mut separators = ByteTrie :: new ( ) ; for string_representation in string_representations { match field_separator ( string_representation . as_str ( ) , & mut separators ) . finish ( ) { Err ( error ) => return Err ( InvalidFieldSeparatorError ( error . input . to_owned ( ) ) ) , Ok ( ( unconsumed_input , _ ) ) if separators . is_empty ( ) && ! unconsumed_input . is_empty ( ) => { return Err ( InvalidFieldSeparatorError ( unconsumed_input . to_owned ( ) ) ) } _ => ( ) , } } Ok ( separators ) }
Parses field separators from a string.
Parses field separators from a string .
string_representations
&[String]