fn parse_types(input: &str) -> Result<Vec<Type>, anyhow::Error> {
    input
        .chars()
        .map(|char| {
            Ok(match char {
                'T' => Type::Text,
                'I' => Type::Integer,
                'R' => Type::Real,
                'B' => Type::Bool,
                'O' => Type::Oid,
                _ => bail!("Unexpected type char {} in: {}", char, input),
            })
        })
        .collect()
}
/// Parse a query result type string into a vec of expected types
Parse a query result type string into a vec of expected types
Parse a query result type string into a vec of expected types
fn parse_types(input: &str) -> Result<Vec<Type>, anyhow::Error> {
    input
        .chars()
        .map(|char| {
            Ok(match char {
                'T' => Type::Text,
                'I' => Type::Integer,
                'R' => Type::Real,
                'B' => Type::Bool,
                'O' => Type::Oid,
                _ => bail!("Unexpected type char {} in: {}", char, input),
            })
        })
        .collect()
}
fn parse_types ( input : & str ) -> Result < Vec < Type > , anyhow :: Error > { input . chars ( ) . map ( | char | { Ok ( match char { 'T' => Type :: Text , 'I' => Type :: Integer , 'R' => Type :: Real , 'B' => Type :: Bool , 'O' => Type :: Oid , _ => bail ! ( " " char input ) , } ) } ) . collect ( ) }
Parse a query result type string into a vec of expected types
Parse a query result type string into a vec of expected types
input
&str
input
&str