pub struct WorkOwnerKey {
pub kind: WorkOwnerKind,
pub id: String,
}Fields§
§kind: WorkOwnerKind§id: StringImplementations§
Source§impl WorkOwnerKey
impl WorkOwnerKey
pub fn new( kind: WorkOwnerKind, id: impl Into<String>, ) -> Result<Self, WorkGraphError>
pub fn principal(id: impl Into<String>) -> Result<Self, WorkGraphError>
pub fn agent(id: impl Into<String>) -> Result<Self, WorkGraphError>
pub fn session(id: impl Into<String>) -> Result<Self, WorkGraphError>
pub fn mob(id: impl Into<String>) -> Result<Self, WorkGraphError>
pub fn label(id: impl Into<String>) -> Result<Self, WorkGraphError>
pub fn canonical(&self) -> String
Trait Implementations§
Source§impl Clone for WorkOwnerKey
impl Clone for WorkOwnerKey
Source§fn clone(&self) -> WorkOwnerKey
fn clone(&self) -> WorkOwnerKey
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 WorkOwnerKey
impl Debug for WorkOwnerKey
Source§impl<'de> Deserialize<'de> for WorkOwnerKey
impl<'de> Deserialize<'de> for WorkOwnerKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WorkOwnerKey
Source§impl Hash for WorkOwnerKey
impl Hash for WorkOwnerKey
Source§impl Ord for WorkOwnerKey
impl Ord for WorkOwnerKey
Source§fn cmp(&self, other: &WorkOwnerKey) -> Ordering
fn cmp(&self, other: &WorkOwnerKey) -> 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 WorkOwnerKey
impl PartialEq for WorkOwnerKey
Source§fn eq(&self, other: &WorkOwnerKey) -> bool
fn eq(&self, other: &WorkOwnerKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for WorkOwnerKey
impl PartialOrd for WorkOwnerKey
Source§impl Serialize for WorkOwnerKey
impl Serialize for WorkOwnerKey
impl StructuralPartialEq for WorkOwnerKey
Auto Trait Implementations§
impl Freeze for WorkOwnerKey
impl RefUnwindSafe for WorkOwnerKey
impl Send for WorkOwnerKey
impl Sync for WorkOwnerKey
impl Unpin for WorkOwnerKey
impl UnsafeUnpin for WorkOwnerKey
impl UnwindSafe for WorkOwnerKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.