pub struct TypedKey<Owner, T> { /* private fields */ }Expand description
A generated one-column PRIMARY KEY or UNIQUE NOT NULL descriptor.
The owner type binds the key to one generated entity, while the encoder preserves the exact RadixDB value tag. References can therefore be created only through a key that codegen proved valid against the saved descriptor.
Implementations§
Source§impl<Owner, T> TypedKey<Owner, T>
impl<Owner, T> TypedKey<Owner, T>
pub const fn new( column: TypedColumn<T, Owner>, primary: bool, encoder: fn(T) -> TypedValue, ) -> Self
pub fn column(&self) -> &TypedColumn<T, Owner>
pub const fn is_primary(&self) -> bool
pub fn reference(&self, key: T) -> Reference<Owner>
Trait Implementations§
Auto Trait Implementations§
impl<Owner, T> Freeze for TypedKey<Owner, T>
impl<Owner, T> RefUnwindSafe for TypedKey<Owner, T>
impl<Owner, T> Send for TypedKey<Owner, T>
impl<Owner, T> Sync for TypedKey<Owner, T>
impl<Owner, T> Unpin for TypedKey<Owner, T>
impl<Owner, T> UnsafeUnpin for TypedKey<Owner, T>
impl<Owner, T> UnwindSafe for TypedKey<Owner, T>
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