pub struct Model {
pub id: String,
pub claimed: Option<u64>,
pub measured: Option<Measured>,
pub price: Option<Price>,
}Expand description
One model of a provider, with both of its context figures and what it costs.
Fields§
§id: StringThe model’s name as the provider writes it, which is what a harness is given.
claimed: Option<u64>The window the model’s own record claims, as the provider’s API reports it.
measured: Option<Measured>The window this server was seen to accept, when it has been measured.
price: Option<Price>What using it costs, when the service says.
Implementations§
Source§impl Model
impl Model
Sourcepub fn window(&self, kind: ProviderKind) -> Option<u64>
pub fn window(&self, kind: ProviderKind) -> Option<u64>
The window a harness on this model is told of: what this server was measured giving, or,
for a kind whose claims are what it serves (ProviderKind::claims_are_served), what it
claims. None when neither is known, and the harness is left to its own assumption.
Sourcepub fn published_at(&self, kind: ProviderKind) -> Option<&'static str>
pub fn published_at(&self, kind: ProviderKind) -> Option<&'static str>
Where the claimed window was read, when it is the maker’s published figure rather than something the service itself answered.
Sourcepub fn is_short_changed(&self) -> bool
pub fn is_short_changed(&self) -> bool
Whether the server gives this model far less room than the model claims, which is the one thing a person has to be told before they point a coding agent at it.
Trait Implementations§
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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