pub struct OperationId(/* private fields */);Expand description
A stable, human-readable operation identity such as users.create.
Implementations§
Source§impl OperationId
impl OperationId
Sourcepub fn new(value: impl Into<String>) -> Result<OperationId, InvalidOperationId>
pub fn new(value: impl Into<String>) -> Result<OperationId, InvalidOperationId>
Creates an operation identity.
Identities are deliberately conservative because they will later be used in generated clients, contract snapshots, and internal service calls.
§Errors
Returns InvalidOperationId when the identity is empty or contains
characters outside the stable operation-id alphabet.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for OperationId
impl Clone for OperationId
Source§fn clone(&self) -> OperationId
fn clone(&self) -> OperationId
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 OperationId
impl Debug for OperationId
Source§impl<'de> Deserialize<'de> for OperationId
impl<'de> Deserialize<'de> for OperationId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OperationId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OperationId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OperationId
impl Display for OperationId
impl Eq for OperationId
Source§impl Hash for OperationId
impl Hash for OperationId
Source§impl Ord for OperationId
impl Ord for OperationId
Source§fn cmp(&self, other: &OperationId) -> Ordering
fn cmp(&self, other: &OperationId) -> 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
Source§impl PartialEq for OperationId
impl PartialEq for OperationId
Source§impl PartialOrd for OperationId
impl PartialOrd for OperationId
Source§impl Serialize for OperationId
impl Serialize for OperationId
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 OperationId
Auto Trait Implementations§
impl Freeze for OperationId
impl RefUnwindSafe for OperationId
impl Send for OperationId
impl Sync for OperationId
impl Unpin for OperationId
impl UnsafeUnpin for OperationId
impl UnwindSafe for OperationId
Blanket Implementations§
Source§impl<T> BackgroundExt for T
impl<T> BackgroundExt for T
fn background(self, task: BackgroundTask) -> Background<Self>
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