pub struct ModelHandle {
pub model: Arc<dyn Model>,
pub price: Price,
}Expand description
A model ready to call plus the price its replies are charged at, unless the model prices its own replies, as a routed one or one metered at this price does. The price travels with the model because a type-erased model hides it, and budgets need it before the call.
Fields§
§model: Arc<dyn Model>§price: PriceTrait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModelHandle
impl !UnwindSafe for ModelHandle
impl Forget for ModelHandle
impl Freeze for ModelHandle
impl Move for ModelHandle
impl Send for ModelHandle
impl Sync for ModelHandle
impl Unpin for ModelHandle
impl UnsafeUnpin for ModelHandlewhere
*const ArcInner<dyn Model> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Model>>: UnsafeUnpin,
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