pub struct CreatedBy {
pub kind: CreatedByKind,
pub id: Option<Uuid>,
pub label: String,
}Expand description
The author of a run, as exposed by the API.
Always present on a RunResponse: a run with
no recorded author (including every run created before authorship tracking)
reports CreatedByKind::System with a label derived from its trigger, so
clients never have to handle a missing value.
§Examples
use ironflow_api::entities::{CreatedBy, CreatedByKind};
// Built from a Run via `CreatedBy::from(&run)`.
let system = CreatedBy {
kind: CreatedByKind::System,
id: None,
label: "manual".to_string(),
};
assert_eq!(system.id, None);Fields§
§kind: CreatedByKindWhat kind of principal triggered the run.
id: Option<Uuid>Identifier of the principal: the user ID, the API key ID, or None for
CreatedByKind::System.
label: StringHuman-readable label. Never empty.
The username for a user, "key-name (username)" for an API key, and the
trigger description for a system run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CreatedBy
impl<'de> Deserialize<'de> for CreatedBy
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 CreatedBy
impl StructuralPartialEq for CreatedBy
Auto Trait Implementations§
impl Freeze for CreatedBy
impl RefUnwindSafe for CreatedBy
impl Send for CreatedBy
impl Sync for CreatedBy
impl Unpin for CreatedBy
impl UnsafeUnpin for CreatedBy
impl UnwindSafe for CreatedBy
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,
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.