Skip to main content

AnytimeStatus

Enum AnytimeStatus 

Source
pub enum AnytimeStatus<Q> {
    Improved(Q),
    Converged(Q),
    Aborted,
}
Expand description

Returned by CuAnytimeTask::base and CuAnytimeTask::refine; drives the runtime’s refinement scheduling.

Q is CuAnytimeTask::Quality: Quality for tasks that can score their result, () for tasks that cannot.

After any Ok return, the output must be valid and hold the best result produced so far for the current job: a quantum that regresses or plateaus keeps its candidate in task-local state and leaves the output untouched. The runtime never buffers or rolls back the output, so it can publish it at any stop point, and the published quality is monotone even when the algorithm internally is not.

Variants§

§

Improved(Q)

The output holds the best result so far; further refinement may help.

§

Converged(Q)

Proactive yield: no further improvement is possible for this job. The output holds the final result, published unless the quality floor rejects it.

§

Aborted

Proactive give-up: the algorithm diverged or reached an unrecoverable state for this job. Refinement stops; the output is published as-is — subject to the quality floor once a quality has been reported — so a task that can no longer vouch even for its base result must clear the payload before returning this. The next copperlist starts a fresh job.

Trait Implementations§

Source§

impl<Q: Clone> Clone for AnytimeStatus<Q>

Source§

fn clone(&self) -> AnytimeStatus<Q>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Q: Copy> Copy for AnytimeStatus<Q>

Source§

impl<Q: Debug> Debug for AnytimeStatus<Q>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Q: PartialEq> PartialEq for AnytimeStatus<Q>

Source§

fn eq(&self, other: &AnytimeStatus<Q>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Q: PartialEq> StructuralPartialEq for AnytimeStatus<Q>

Auto Trait Implementations§

§

impl<Q> Freeze for AnytimeStatus<Q>
where Q: Freeze,

§

impl<Q> RefUnwindSafe for AnytimeStatus<Q>
where Q: RefUnwindSafe,

§

impl<Q> Send for AnytimeStatus<Q>
where Q: Send,

§

impl<Q> Sync for AnytimeStatus<Q>
where Q: Sync,

§

impl<Q> Unpin for AnytimeStatus<Q>
where Q: Unpin,

§

impl<Q> UnsafeUnpin for AnytimeStatus<Q>
where Q: UnsafeUnpin,

§

impl<Q> UnwindSafe for AnytimeStatus<Q>
where Q: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetTypeRegistration for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PayloadDefaultHandlePolicyApply for T
where T: ?Sized,

Source§

impl<T> PayloadDefaultLoggingPolicy for T
where T: ?Sized,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Reflect for T
where T: 'static,

Source§

impl<T> ReflectTypePath for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.