pub struct RuntimeBranch {
pub id: Uuid,
pub purpose: RuntimeTaskPurpose,
pub optimization: RuntimeOptimizationKind,
pub priority: RuntimeTaskPriority,
pub commit_behavior: RuntimeCommitBehavior,
pub status: RuntimeBranchStatus,
}Expand description
Metadata for one branch scheduled during a turn.
Fields§
§id: Uuid§purpose: RuntimeTaskPurpose§optimization: RuntimeOptimizationKind§priority: RuntimeTaskPriority§commit_behavior: RuntimeCommitBehavior§status: RuntimeBranchStatusImplementations§
Source§impl RuntimeBranch
impl RuntimeBranch
pub fn new( purpose: RuntimeTaskPurpose, optimization: RuntimeOptimizationKind, priority: RuntimeTaskPriority, commit_behavior: RuntimeCommitBehavior, ) -> RuntimeBranch
pub fn transition_to( &mut self, next: RuntimeBranchStatus, ) -> Result<(), AgentError>
pub fn complete(&mut self) -> Result<(), AgentError>
pub fn commit(&mut self) -> Result<(), AgentError>
pub fn discard(&mut self) -> Result<(), AgentError>
pub fn fail(&mut self) -> Result<(), AgentError>
pub fn cancel(&mut self) -> Result<(), AgentError>
pub fn branch_id(&self) -> String
Trait Implementations§
Source§impl Clone for RuntimeBranch
impl Clone for RuntimeBranch
Source§fn clone(&self) -> RuntimeBranch
fn clone(&self) -> RuntimeBranch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeBranch
impl RefUnwindSafe for RuntimeBranch
impl Send for RuntimeBranch
impl Sync for RuntimeBranch
impl Unpin for RuntimeBranch
impl UnsafeUnpin for RuntimeBranch
impl UnwindSafe for RuntimeBranch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreCreates a shared type from an unshared type.