pub enum ModelSelectionAction {
Continue,
Select(ModelHandle),
Stop(String),
}Expand description
Action for model-selection hooks.
Variants§
Continue
Keep the candidate supplied to this hook.
Select(ModelHandle)
Replace the candidate and pass it to later hooks.
Stop(String)
Stop the run before request preparation or model execution.
Implementations§
Source§impl ModelSelectionAction
impl ModelSelectionAction
Sourcepub fn continue_run() -> Self
pub fn continue_run() -> Self
Keeps the current model candidate.
Sourcepub fn select(model: ModelHandle) -> Self
pub fn select(model: ModelHandle) -> Self
Selects model and passes it to later hooks.
Sourcepub fn stop(reason: impl Into<String>) -> Self
pub fn stop(reason: impl Into<String>) -> Self
Stops the run before the pending model attempt.
A selection stop happens before the attempt is issued, so it does not
advance ModelSelection::previous_model.
Trait Implementations§
Source§impl Clone for ModelSelectionAction
impl Clone for ModelSelectionAction
Source§fn clone(&self) -> ModelSelectionAction
fn clone(&self) -> ModelSelectionAction
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 !RefUnwindSafe for ModelSelectionAction
impl !UnwindSafe for ModelSelectionAction
impl Freeze for ModelSelectionAction
impl Send for ModelSelectionAction
impl Sync for ModelSelectionAction
impl Unpin for ModelSelectionAction
impl UnsafeUnpin for ModelSelectionAction
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