pub struct IdempotencyKey(/* private fields */);
Expand description
Represents valid idempotency key
- Cannot be empty
- Cannot be longer than 255 charachters
Implementations§
Source§impl IdempotencyKey
impl IdempotencyKey
Sourcepub fn new(val: impl AsRef<str>) -> Result<Self, IdempotentKeyError>
pub fn new(val: impl AsRef<str>) -> Result<Self, IdempotentKeyError>
Creates new validated idempotency key.
§Errors
This function returns error when they key is empty or when its longer than 255 characters
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes self and returns inner string
Trait Implementations§
Source§impl Clone for IdempotencyKey
impl Clone for IdempotencyKey
Source§fn clone(&self) -> IdempotencyKey
fn clone(&self) -> IdempotencyKey
Returns a duplicate of the value. Read more
1.0.0 · 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 IdempotencyKey
impl Debug for IdempotencyKey
Source§impl PartialEq for IdempotencyKey
impl PartialEq for IdempotencyKey
Source§impl TryFrom<String> for IdempotencyKey
impl TryFrom<String> for IdempotencyKey
impl Eq for IdempotencyKey
impl StructuralPartialEq for IdempotencyKey
Auto Trait Implementations§
impl Freeze for IdempotencyKey
impl RefUnwindSafe for IdempotencyKey
impl Send for IdempotencyKey
impl Sync for IdempotencyKey
impl Unpin for IdempotencyKey
impl UnwindSafe for IdempotencyKey
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