pub struct Plan {
pub id: String,
pub goal: String,
pub steps: Vec<PlanStep>,
pub status: PlanStatus,
pub created_at: DateTime<Utc>,
}Fields§
§id: String§goal: String§steps: Vec<PlanStep>§status: PlanStatus§created_at: DateTime<Utc>Implementations§
Source§impl Plan
impl Plan
pub fn new(goal: impl Into<String>) -> Self
pub fn with_steps(self, steps: Vec<PlanStep>) -> Self
pub fn add_step(&mut self, step: PlanStep)
pub fn is_complete(&self) -> bool
pub fn is_failed(&self) -> bool
pub fn pending_steps(&self) -> impl Iterator<Item = &PlanStep>
pub fn completed_steps(&self) -> impl Iterator<Item = &PlanStep>
pub fn next_executable_step(&self) -> Option<&PlanStep>
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 UnsafeUnpin 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