pub struct WorkstreamRow {
pub id: WorkstreamId,
pub name: String,
pub state: WorkstreamState,
pub session_ids: Vec<String>,
pub updated_at: DateTime<Utc>,
}Expand description
One row of workstream.list’s wire response, as needed to render
render_workstream_table (#3296, DOC-48 §5.4).
Why: the daemon’s workstream.list response nests each record as
crate::workstreams::protocol::WorkstreamView — private to that module,
and carrying fields (metadata, created_at) the table never displays.
This is the CLI’s own minimal read-only projection of that wire shape;
serde’s default “ignore unknown fields” behavior means it deserializes
straight out of the same JSON without the protocol module needing to
expose anything new.
What: id/state reuse the library’s own WorkstreamId/
WorkstreamState types (both already pub from crate::workstreams)
so the table can never disagree with the domain model on what “active”
means; session_ids is only read for its length (live session count).
Test: tests::render_workstream_table_marks_the_active_row.
Fields§
§id: WorkstreamId§name: String§state: WorkstreamState§session_ids: Vec<String>§updated_at: DateTime<Utc>Trait Implementations§
Source§impl Debug for WorkstreamRow
impl Debug for WorkstreamRow
Source§impl<'de> Deserialize<'de> for WorkstreamRow
impl<'de> Deserialize<'de> for WorkstreamRow
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>,
Auto Trait Implementations§
impl Freeze for WorkstreamRow
impl RefUnwindSafe for WorkstreamRow
impl Send for WorkstreamRow
impl Sync for WorkstreamRow
impl Unpin for WorkstreamRow
impl UnsafeUnpin for WorkstreamRow
impl UnwindSafe for WorkstreamRow
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more