Function serde_rusqlite::columns_from_statement[][src]

pub fn columns_from_statement(stmt: &Statement<'_>) -> Vec<String>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator

Returns column names of the statement the way from_row_with_columns() method expects them

This function is needed because by default column_names() returns Vec<&str> which ties it to the lifetime of the rusqlite::Statement. This way we won’t be able to run for example .query_map() because it mutably borrows rusqlite::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 rusqlite::Statement.