pub struct TableDef {
pub name: &'static str,
pub strict: bool,
pub without_rowid: bool,
}Expand description
Const-friendly table definition for compile-time schema definitions.
This type uses only Copy types (&'static str, bool) so it can be
used in const contexts. Use TableDef::into_table to convert to
the runtime Table type when needed.
§Examples
use drizzle_types::sqlite::ddl::TableDef;
// Fully const - can be used in const contexts
const USERS: TableDef = TableDef::new("users").strict();
assert_eq!(USERS.name, "users");
assert!(USERS.strict);Fields§
§name: &'static strTable name
strict: boolIs this a STRICT table?
without_rowid: boolIs this a WITHOUT ROWID table?
Implementations§
Trait Implementations§
impl Copy for TableDef
impl Eq for TableDef
impl StructuralPartialEq for TableDef
Auto Trait Implementations§
impl Freeze for TableDef
impl RefUnwindSafe for TableDef
impl Send for TableDef
impl Sync for TableDef
impl Unpin for TableDef
impl UnwindSafe for TableDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more