pub struct Metadata {
pub id: Option<String>,
pub name: String,
pub creator: Option<String>,
pub description: String,
pub tags: Vec<String>,
pub labels: Vec<Label>,
pub workflow_ref: Option<String>,
}
Expand description
Metadata represents common metadata fields used across different resource types.
§Examples
use crate::models::Metadata;
use crate::models::Label;
let metadata = Metadata {
id: Some("task-123".to_string()),
name: "my-task".to_string(),
creator: Some("alice".to_string()),
description: "An example task".to_string(),
tags: vec!["tag1".to_string(), "tag2".to_string()],
labels: vec![
Label {
key: "env".to_string(),
value: "prod".to_string()
}
],
workflow_ref: None
};
Fields§
§id: Option<String>
Unique identifier for the resource
name: String
Name of the resource
creator: Option<String>
Creator/owner of the resource
description: String
Detailed description of the resource
List of searchable tags
labels: Vec<Label>
List of key-value labels
workflow_ref: Option<String>
Reference to a parent workflow (only used in TaskMetadata)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request