proof_of_sql::base::database::table_utility

Function borrowed_boolean

Source
pub fn borrowed_boolean<S: Scalar>(
    name: impl Deref<Target = str>,
    data: impl IntoIterator<Item = impl Into<bool>>,
    alloc: &Bump,
) -> (Identifier, Column<'_, S>)
Expand description

Creates a (Identifier, Column) pair for a boolean column. This is primarily intended for use in conjunction with table.

§Example

use bumpalo::Bump;
use proof_of_sql::base::{database::table_utility::*, scalar::Curve25519Scalar};
let alloc = Bump::new();
let result = table::<Curve25519Scalar>([
    borrowed_boolean("a", [true, false, true], &alloc),
]);

§Panics

  • Panics if name.parse() fails to convert the name into an Identifier.