pub struct PrimaryKey { /* private fields */ }Expand description
PrimaryKey
Structured primary-key metadata for an entity schema.
Implementations§
Source§impl PrimaryKey
impl PrimaryKey
Sourcepub const fn new(
fields: &'static [&'static str],
source: PrimaryKeySource,
) -> Self
pub const fn new( fields: &'static [&'static str], source: PrimaryKeySource, ) -> Self
Build one primary-key declaration from ordered field names and source.
Sourcepub const fn fields(&self) -> &'static [&'static str]
pub const fn fields(&self) -> &'static [&'static str]
Borrow the ordered primary-key field names.
Sourcepub const fn field(&self) -> &'static str
pub const fn field(&self) -> &'static str
Borrow the scalar primary-key field name used by the current runtime.
Sourcepub const fn source(&self) -> PrimaryKeySource
pub const fn source(&self) -> PrimaryKeySource
Borrow the primary-key source declaration.
Trait Implementations§
Source§impl Clone for PrimaryKey
impl Clone for PrimaryKey
Source§fn clone(&self) -> PrimaryKey
fn clone(&self) -> PrimaryKey
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 moreSource§impl Debug for PrimaryKey
impl Debug for PrimaryKey
Auto Trait Implementations§
impl Freeze for PrimaryKey
impl RefUnwindSafe for PrimaryKey
impl Send for PrimaryKey
impl Sync for PrimaryKey
impl Unpin for PrimaryKey
impl UnsafeUnpin for PrimaryKey
impl UnwindSafe for PrimaryKey
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