pub struct NoId;Expand description
Zero-sized placeholder used when a key component is a compile-time constant.
NoId is the PkId or SkId type parameter of KeyId for item types
whose partition key or sort key is a constant (e.g. singleton items like
the PlatformConfig in the crate examples). It carries no data because
the key value is baked into the type’s
HasConstAttribute impl.
You will encounter NoId as part of KeyId::NONE for singleton items,
and as the SkId of KeyId::pk for items with a variable PK but a
constant SK.
§Examples
use dynamodb_facade::{KeyId, NoId};
// Singleton item — both PK and SK are constants.
let key_id: KeyId<NoId, NoId> = KeyId::NONE;
// Variable PK, constant SK — SkId is NoId.
let key_id: KeyId<&str, NoId> = KeyId::pk("user-1");Trait Implementations§
impl Copy for NoId
Auto Trait Implementations§
impl Freeze for NoId
impl RefUnwindSafe for NoId
impl Send for NoId
impl Sync for NoId
impl Unpin for NoId
impl UnsafeUnpin for NoId
impl UnwindSafe for NoId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.