pub struct Lineup {
pub name: Tag,
pub models: Vec<String>,
}Expand description
A named order of one provider’s models: which one to try first, and what to fall back to.
The name is the person’s own word for it — coder — because that is what they pick and what a
harness is told instead of a model nobody would recognise. It follows the same rules as a
provider’s tag, so it can never read as a model name or collide with a key of the file.
Fields§
§name: TagThe name this order is chosen and shown by.
models: Vec<String>The models in the order they are tried.
Implementations§
Source§impl Lineup
impl Lineup
Sourcepub fn window(&self, entry: &ProviderEntry) -> Option<u64>
pub fn window(&self, entry: &ProviderEntry) -> Option<u64>
The window to promise a harness that runs on this order: the smallest of the steps whose window is known.
The smallest, because the conversation may go on on any step of the order and what is
promised has to hold for the one that ends up answering. None when no step’s window is
known, which is not the same as a small one: the harness is then left to its own
assumption rather than cut off by a figure nobody measured.
Sourcepub fn paid<'a>(&self, entry: &'a ProviderEntry) -> Vec<&'a str>
pub fn paid<'a>(&self, entry: &'a ProviderEntry) -> Vec<&'a str>
The steps a request spends money on when it lands on one, so that the person hears it while they are choosing the order rather than from a bill afterwards. A step whose price nobody published is not named here: nothing is claimed about a price that was not read.
Sourcepub fn unknown_window(&self, entry: &ProviderEntry) -> Vec<&str>
pub fn unknown_window(&self, entry: &ProviderEntry) -> Vec<&str>
The steps whose window is not known, which the person is told about rather than left to discover as a conversation cut in half. A step naming a model this provider was not last seen to have is in here too: nothing is known about a window, for exactly that reason.
Trait Implementations§
impl Eq for Lineup
impl StructuralPartialEq for Lineup
Auto Trait Implementations§
impl Freeze for Lineup
impl RefUnwindSafe for Lineup
impl Send for Lineup
impl Sync for Lineup
impl Unpin for Lineup
impl UnsafeUnpin for Lineup
impl UnwindSafe for Lineup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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