pub struct Item {
pub id: String,
pub title: Option<String>,
pub description: Option<String>,
pub status: String,
pub priority: Option<u8>,
pub sources: Vec<Source>,
pub metadata: Value,
pub created_at: String,
pub updated_at: String,
pub blocked_by: Vec<String>,
pub errors: Vec<Value>,
}Fields§
§id: String§title: Option<String>§description: Option<String>§status: String§priority: Option<u8>§sources: Vec<Source>§metadata: Value§created_at: String§updated_at: String§blocked_by: Vec<String>§errors: Vec<Value>Implementations§
Source§impl Item
Serialize items through serde so the struct definition is the source of
truth for JSON output.
impl Item
Serialize items through serde so the struct definition is the source of truth for JSON output.
Note: this serializes the item’s current status field verbatim. Callers
that want display/view semantics (for example, surfacing blocked as a
computed status in read-oriented output) must first call
with_computed_status(...).
pub fn to_json_value(&self) -> Value
pub fn to_json_string(&self) -> String
pub fn pending(&self) -> bool
pub fn blocked(&self) -> bool
Sourcepub fn computed_status(&self, open_ids: Option<&HashSet<String>>) -> String
pub fn computed_status(&self, open_ids: Option<&HashSet<String>>) -> String
Compute the visible status for read-oriented views.
Persisted lifecycle status remains pending|in_progress|closed, but
pending items with open blockers are surfaced as blocked in display
output.
pub fn with_computed_status(&self, open_ids: Option<&HashSet<String>>) -> Self
pub fn ready(&self, open_ids: Option<&HashSet<String>>) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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 StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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