pub struct TableDefinition<'a, K, V>{ /* private fields */ }Expand description
Defines the name and types of a table
A TableDefinition should be opened for use by calling ReadTransaction::open_table or WriteTransaction::open_table
Note that the lifetime of the K and V type parameters does not impact the lifetimes of the data
that is stored or retreived from the table
Implementations§
Source§impl<'a, K, V> TableDefinition<'a, K, V>
impl<'a, K, V> TableDefinition<'a, K, V>
Sourcepub const fn new(name: &'a str) -> TableDefinition<'a, K, V>
pub const fn new(name: &'a str) -> TableDefinition<'a, K, V>
Construct a new table with given name
§Panics
Panics if name is empty. When name is a non-empty string literal
this is checked at compile time, but callers that build the name at
runtime are responsible for ensuring it is non-empty.
Trait Implementations§
Source§impl<K, V> Clone for TableDefinition<'_, K, V>
impl<K, V> Clone for TableDefinition<'_, K, V>
Source§fn clone(&self) -> TableDefinition<'_, K, V>
fn clone(&self) -> TableDefinition<'_, K, V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<K, V> Copy for TableDefinition<'_, K, V>
Source§impl<K, V> Display for TableDefinition<'_, K, V>
impl<K, V> Display for TableDefinition<'_, K, V>
Source§impl<K, V> TableHandle for TableDefinition<'_, K, V>
impl<K, V> TableHandle for TableDefinition<'_, K, V>
Auto Trait Implementations§
impl<'a, K, V> Freeze for TableDefinition<'a, K, V>
impl<'a, K, V> RefUnwindSafe for TableDefinition<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for TableDefinition<'a, K, V>
impl<'a, K, V> Sync for TableDefinition<'a, K, V>
impl<'a, K, V> Unpin for TableDefinition<'a, K, V>
impl<'a, K, V> UnsafeUnpin for TableDefinition<'a, K, V>
impl<'a, K, V> UnwindSafe for TableDefinition<'a, K, V>where
K: UnwindSafe,
V: UnwindSafe,
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