pub enum IdSource {
Provider,
Derived(&'static [&'static str]),
}Expand description
Whose uniqueness an identifier rests on.
One question, asked of every identifier kasapay hands back: did the provider give us this, or did we make it up? A caller writing an identifier into a unique index — so a second webhook delivery collides instead of shipping twice — is relying on somebody’s guarantee, and the two answers are worth very different things.
Exhaustive on purpose. There is no third answer, and an adapter that adds one has invented a guarantee nobody made.
Variants§
Provider
The provider issued it, and it is unique because they say so.
Derived(&'static [&'static str])
kasapay composed it out of the named fields, because the provider issues none of its own. It is unique exactly as far as those fields are.
Trait Implementations§
impl Copy for IdSource
impl Eq for IdSource
Source§impl Ord for IdSource
impl Ord for IdSource
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for IdSource
impl PartialOrd for IdSource
impl StructuralPartialEq for IdSource
Auto Trait Implementations§
impl Freeze for IdSource
impl RefUnwindSafe for IdSource
impl Send for IdSource
impl Sync for IdSource
impl Unpin for IdSource
impl UnsafeUnpin for IdSource
impl UnwindSafe for IdSource
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