pub struct ModelCostRegistry { /* private fields */ }Expand description
Model cost registry
Implementations§
Source§impl ModelCostRegistry
impl ModelCostRegistry
pub fn new() -> Self
Sourcepub fn get(&self, model: &str) -> &ModelCosts
pub fn get(&self, model: &str) -> &ModelCosts
Get cost for a model
Sourcepub fn register(&mut self, model: &str, costs: ModelCosts)
pub fn register(&mut self, model: &str, costs: ModelCosts)
Register a custom model cost
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelCostRegistry
impl RefUnwindSafe for ModelCostRegistry
impl Send for ModelCostRegistry
impl Sync for ModelCostRegistry
impl Unpin for ModelCostRegistry
impl UnsafeUnpin for ModelCostRegistry
impl UnwindSafe for ModelCostRegistry
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