pub struct LogicalKey(/* private fields */);Expand description
The application’s identifier for one logical occurrence of an effect,
e.g. the order id for payment.charge.
Implementations§
Source§impl LogicalKey
impl LogicalKey
Sourcepub fn new(key: impl Into<String>) -> Result<LogicalKey, IdentityError>
pub fn new(key: impl Into<String>) -> Result<LogicalKey, IdentityError>
Validates and wraps a key.
§Errors
Rejects empty keys, keys over MAX_KEY_LEN bytes and keys containing
control characters.
Trait Implementations§
Source§impl Clone for LogicalKey
impl Clone for LogicalKey
Source§fn clone(&self) -> LogicalKey
fn clone(&self) -> LogicalKey
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 LogicalKey
impl Debug for LogicalKey
Source§impl<'de> Deserialize<'de> for LogicalKey
impl<'de> Deserialize<'de> for LogicalKey
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogicalKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogicalKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LogicalKey
impl Display for LogicalKey
impl Eq for LogicalKey
Source§impl Hash for LogicalKey
impl Hash for LogicalKey
Source§impl Ord for LogicalKey
impl Ord for LogicalKey
Source§fn cmp(&self, other: &LogicalKey) -> Ordering
fn cmp(&self, other: &LogicalKey) -> Ordering
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LogicalKey
impl PartialEq for LogicalKey
Source§impl PartialOrd for LogicalKey
impl PartialOrd for LogicalKey
Source§impl Serialize for LogicalKey
impl Serialize for LogicalKey
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LogicalKey
Source§impl TryFrom<String> for LogicalKey
impl TryFrom<String> for LogicalKey
Source§type Error = IdentityError
type Error = IdentityError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<LogicalKey, <LogicalKey as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<LogicalKey, <LogicalKey as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for LogicalKey
impl RefUnwindSafe for LogicalKey
impl Send for LogicalKey
impl Sync for LogicalKey
impl Unpin for LogicalKey
impl UnsafeUnpin for LogicalKey
impl UnwindSafe for LogicalKey
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