pub struct IdempotencyIntent<'secret> { /* private fields */ }Expand description
One-use fresh intent identifier supplied by a caller CSPRNG.
This type is intentionally neither Copy nor Clone. Construction checks
shape and retains exclusive access to caller storage until drop. Invalid
sources are cleared immediately. Entropy quality and global uniqueness
remain caller duties.
ⓘ
use cloud_sdk::retry::IdempotencyIntent;
let mut entropy = [7_u8; 32];
let intent = IdempotencyIntent::new(&mut entropy).unwrap();
let _duplicate = intent.clone();Implementations§
Source§impl<'secret> IdempotencyIntent<'secret>
impl<'secret> IdempotencyIntent<'secret>
Sourcepub fn new(source: &'secret mut [u8]) -> Result<Self, IdempotencyIntentError>
pub fn new(source: &'secret mut [u8]) -> Result<Self, IdempotencyIntentError>
Borrows fresh bytes exclusively and clears invalid sources immediately.
Trait Implementations§
Source§impl Debug for IdempotencyIntent<'_>
impl Debug for IdempotencyIntent<'_>
Source§impl Drop for IdempotencyIntent<'_>
impl Drop for IdempotencyIntent<'_>
Auto Trait Implementations§
impl<'secret> !UnwindSafe for IdempotencyIntent<'secret>
impl<'secret> Freeze for IdempotencyIntent<'secret>
impl<'secret> RefUnwindSafe for IdempotencyIntent<'secret>
impl<'secret> Send for IdempotencyIntent<'secret>
impl<'secret> Sync for IdempotencyIntent<'secret>
impl<'secret> Unpin for IdempotencyIntent<'secret>
impl<'secret> UnsafeUnpin for IdempotencyIntent<'secret>
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