pub struct MegatronQueue { /* private fields */ }Expand description
A Queue over a fleet mission’s projects. Shells fno megatron next /
fno megatron complete; never touches the fleet directory itself.
Implementations§
Trait Implementations§
Source§impl Queue for MegatronQueue
impl Queue for MegatronQueue
Source§fn next(&mut self) -> Result<Option<Unit>, LoopError>
fn next(&mut self) -> Result<Option<Unit>, LoopError>
Dequeue the next incomplete project of the mission.
fno megatron next <mission> --json contract:
null-> mission complete -> Ok(None){"pause": {"policy","detail"}}-> Err(LoopError::Pause{policy, detail}) (run_loop maps this to walk_paused + NoProgress)- unit object -> Some(Unit)
Source§fn close(
&mut self,
unit: &Unit,
evidence: &Evidence,
) -> Result<CloseOutcome, LoopError>
fn close( &mut self, unit: &Unit, evidence: &Evidence, ) -> Result<CloseOutcome, LoopError>
Record the child walk’s outcome against the mission.
NoWork (walk drained) | DonePRGreen | DoneAdvisory -> complete --outcome done -> Closed. Anything else -> complete --outcome failed (the verb pauses the mission) -> Parked; the NEXT next() call
returns the pause and run_loop terminates NoProgress.
Auto Trait Implementations§
impl Freeze for MegatronQueue
impl RefUnwindSafe for MegatronQueue
impl Send for MegatronQueue
impl Sync for MegatronQueue
impl Unpin for MegatronQueue
impl UnsafeUnpin for MegatronQueue
impl UnwindSafe for MegatronQueue
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.