Struct TaskGoal
pub struct TaskGoal { /* private fields */ }Implementations§
Source§impl TaskGoal
impl TaskGoal
Sourcepub fn new(task: TaskRecord, goal: GoalTaskRecord) -> Self
pub fn new(task: TaskRecord, goal: GoalTaskRecord) -> Self
Build an on-demand goal view from its canonical task row and goal extension row.
Sourcepub fn task(&self) -> &TaskRecord
pub fn task(&self) -> &TaskRecord
Borrow the canonical task row.
Sourcepub fn goal(&self) -> &GoalTaskRecord
pub fn goal(&self) -> &GoalTaskRecord
Borrow the goal extension row.
Sourcepub fn status(&self) -> TaskStatus
pub fn status(&self) -> TaskStatus
Canonical lifecycle state for this goal task.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
True when the canonical task status is Running.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
True when the canonical task status is terminal.
pub fn with_effective_limits( self, token_limit: Option<u64>, cost_limit_usd: Option<f64>, ) -> Self
pub fn into_task(self) -> TaskRecord
Sourcepub fn into_parts(self) -> (TaskRecord, GoalTaskRecord)
pub fn into_parts(self) -> (TaskRecord, GoalTaskRecord)
Consume the view and return both canonical rows.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskGoal
impl RefUnwindSafe for TaskGoal
impl Send for TaskGoal
impl Sync for TaskGoal
impl Unpin for TaskGoal
impl UnsafeUnpin for TaskGoal
impl UnwindSafe for TaskGoal
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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