Function serde_rusqlite::columns_from_statement[][src]

Important traits for Vec<u8>
pub fn columns_from_statement(stmt: &Statement) -> Vec<String>

Returns column names of the statement the way *_with_columns() method family expects them

This function is needed because by default column_names() returns Vec<&str> which ties it to the lifetime of the Statement. This way we won't be able to run for example .query_map() because it mutably borrows Statement and by that time it's already borrowed for columns. So this function owns all column names to detach them from the lifetime of Statement.