pub struct Plan {Show 13 fields
pub id: String,
pub short_id: Option<String>,
pub project_id: String,
pub project_path: String,
pub title: String,
pub content: Option<String>,
pub status: PlanStatus,
pub success_criteria: Option<String>,
pub created_in_session: Option<String>,
pub completed_in_session: Option<String>,
pub created_at: i64,
pub updated_at: i64,
pub completed_at: Option<i64>,
}Expand description
A plan in SaveContext.
Plans provide:
- PRD/specification storage
- Linkage to epics and issues
- Success criteria tracking
- Status progression (draft -> active -> completed)
Fields§
§id: StringUnique identifier (UUID format)
short_id: Option<String>Short ID for easy reference (e.g., “PLAN-1”)
project_id: StringProject ID this plan belongs to
project_path: StringProject path for queries
title: StringPlan title
content: Option<String>Plan content (markdown PRD/spec)
status: PlanStatusCurrent status
success_criteria: Option<String>Success criteria for completion
created_in_session: Option<String>Session where this plan was created
completed_in_session: Option<String>Session where this plan was completed
created_at: i64Creation timestamp (Unix milliseconds)
updated_at: i64Last update timestamp (Unix milliseconds)
completed_at: Option<i64>Completion timestamp (Unix milliseconds)
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn new(project_id: String, project_path: String, title: String) -> Self
pub fn new(project_id: String, project_path: String, title: String) -> Self
Create a new plan with default values.
Sourcepub fn with_content(self, content: &str) -> Self
pub fn with_content(self, content: &str) -> Self
Set the plan content.
Sourcepub fn with_status(self, status: PlanStatus) -> Self
pub fn with_status(self, status: PlanStatus) -> Self
Set the plan status.
Sourcepub fn with_success_criteria(self, criteria: &str) -> Self
pub fn with_success_criteria(self, criteria: &str) -> Self
Set the success criteria.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
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 Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnwindSafe for Plan
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,
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>
Converts
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>
Converts
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