Issue

Struct Issue 

Source
pub struct Issue {
Show 39 fields pub id: String, pub content_hash: Option<String>, pub title: String, pub description: Option<String>, pub design: Option<String>, pub acceptance_criteria: Option<String>, pub notes: Option<String>, pub status: Status, pub priority: i32, pub issue_type: IssueType, pub assignee: Option<String>, pub owner: Option<String>, pub estimated_minutes: Option<i32>, pub created_at: DateTime<Utc>, pub created_by: String, pub updated_at: DateTime<Utc>, pub closed_at: Option<DateTime<Utc>>, pub close_reason: Option<String>, pub due_at: Option<DateTime<Utc>>, pub defer_until: Option<DateTime<Utc>>, pub external_ref: Option<String>, pub source_system: Option<String>, pub labels: Vec<String>, pub deleted_at: Option<DateTime<Utc>>, pub deleted_by: Option<String>, pub delete_reason: Option<String>, pub compaction_level: Option<i32>, pub compacted_at: Option<DateTime<Utc>>, pub compacted_at_commit: Option<String>, pub original_size: Option<i32>, pub agent_state: Option<AgentState>, pub mol_type: Option<MolType>, pub hook_bead: Option<String>, pub role_bead: Option<String>, pub rig: Option<String>, pub last_activity: Option<DateTime<Utc>>, pub pinned: bool, pub is_template: bool, pub ephemeral: bool,
}
Expand description

The central entity representing a trackable work item.

Fields§

§id: String

Unique identifier (format: bd-xxxx or bd-xxxx.n for children).

§content_hash: Option<String>

SHA256 hash of canonical content for deduplication.

§title: String

Work item name (max 500 chars).

§description: Option<String>

Detailed explanation.

§design: Option<String>

Design specifications.

§acceptance_criteria: Option<String>

Definition of done.

§notes: Option<String>

Additional notes.

§status: Status

Current workflow state.

§priority: i32

Numeric priority (0-4, lower is higher priority).

§issue_type: IssueType

Type of work.

§assignee: Option<String>

Primary worker.

§owner: Option<String>

Responsible party.

§estimated_minutes: Option<i32>

Time estimate in minutes.

§created_at: DateTime<Utc>

When the issue was created.

§created_by: String

Who created the issue.

§updated_at: DateTime<Utc>

When the issue was last modified.

§closed_at: Option<DateTime<Utc>>

When the issue was closed.

§close_reason: Option<String>

Why the issue was closed.

§due_at: Option<DateTime<Utc>>

Deadline.

§defer_until: Option<DateTime<Utc>>

Postpone until date.

§external_ref: Option<String>

Reference to external system (Linear, Jira, etc.).

§source_system: Option<String>

Origin system identifier.

§labels: Vec<String>

Associated tags.

§deleted_at: Option<DateTime<Utc>>

When the issue was soft-deleted.

§deleted_by: Option<String>

Who deleted the issue.

§delete_reason: Option<String>

Why the issue was deleted.

§compaction_level: Option<i32>

Level of compaction applied (0 = none).

§compacted_at: Option<DateTime<Utc>>

When the issue was compacted.

§compacted_at_commit: Option<String>

Git commit at time of compaction.

§original_size: Option<i32>

Original size before compaction.

§agent_state: Option<AgentState>

Self-reported agent state.

§mol_type: Option<MolType>

Type of molecule.

§hook_bead: Option<String>

Hook bead reference.

§role_bead: Option<String>

Role bead reference.

§rig: Option<String>

Rig reference.

§last_activity: Option<DateTime<Utc>>

Last activity timestamp.

§pinned: bool

Whether this issue is pinned.

§is_template: bool

Whether this issue is a template.

§ephemeral: bool

Whether this is ephemeral (not persisted).

Implementations§

Source§

impl Issue

Source

pub fn new( id: impl Into<String>, title: impl Into<String>, created_by: impl Into<String>, ) -> Self

Create a new issue with minimal required fields.

Source

pub fn compute_content_hash(&self) -> String

Compute the content hash for this issue.

Source

pub fn update_content_hash(&mut self)

Update the content hash.

Source

pub fn touch(&mut self)

Mark this issue as updated.

Source

pub fn close(&mut self, reason: Option<String>)

Close this issue.

Source

pub fn tombstone(&mut self, actor: &str, reason: Option<String>)

Soft-delete this issue (tombstone).

Source

pub fn is_deleted(&self) -> bool

Returns true if this issue is soft-deleted.

Source

pub fn is_potentially_ready(&self) -> bool

Returns true if this issue is ready for work (no blocking dependencies). Note: This only checks the issue’s own status; dependency checking is done in storage.

Source

pub fn parent_id(&self) -> Option<&str>

Returns the parent ID if this is a child issue (bd-xxxx.n format).

Source

pub fn has_parent(&self) -> bool

Returns true if this issue has a parent.

Source

pub fn with_description(self, desc: impl Into<String>) -> Self

Builder method to set description.

Source

pub fn with_type(self, issue_type: IssueType) -> Self

Builder method to set issue type.

Source

pub fn with_priority(self, priority: i32) -> Self

Builder method to set priority.

Source

pub fn with_assignee(self, assignee: impl Into<String>) -> Self

Builder method to set assignee.

Source

pub fn with_label(self, label: impl Into<String>) -> Self

Builder method to add a label.

Trait Implementations§

Source§

impl Clone for Issue

Source§

fn clone(&self) -> Issue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Issue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Issue

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Issue

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Issue

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Issue

§

impl RefUnwindSafe for Issue

§

impl Send for Issue

§

impl Sync for Issue

§

impl Unpin for Issue

§

impl UnwindSafe for Issue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,