pub struct TieredModels<M> {
pub advanced: Option<ModelGroup<M>>,
pub balanced: Option<ModelGroup<M>>,
pub fast: Option<ModelGroup<M>>,
}Expand description
Collection of model groups organized by tier.
Fields§
§advanced: Option<ModelGroup<M>>Advanced tier models.
balanced: Option<ModelGroup<M>>Balanced tier models.
fast: Option<ModelGroup<M>>Fast tier models.
Implementations§
Source§impl<M> TieredModels<M>
impl<M> TieredModels<M>
Sourcepub fn with_advanced(self, group: ModelGroup<M>) -> Self
pub fn with_advanced(self, group: ModelGroup<M>) -> Self
Sets the advanced tier models.
Sourcepub fn with_balanced(self, group: ModelGroup<M>) -> Self
pub fn with_balanced(self, group: ModelGroup<M>) -> Self
Sets the balanced tier models.
Sourcepub fn with_fast(self, group: ModelGroup<M>) -> Self
pub fn with_fast(self, group: ModelGroup<M>) -> Self
Sets the fast tier models.
Sourcepub const fn get(&self, tier: ModelTier) -> Option<&ModelGroup<M>>
pub const fn get(&self, tier: ModelTier) -> Option<&ModelGroup<M>>
Gets the model group for a specific tier.
Sourcepub const fn get_mut(&mut self, tier: ModelTier) -> Option<&mut ModelGroup<M>>
pub const fn get_mut(&mut self, tier: ModelTier) -> Option<&mut ModelGroup<M>>
Gets a mutable reference to the model group for a specific tier.
Trait Implementations§
Source§impl<M: Debug> Debug for TieredModels<M>
impl<M: Debug> Debug for TieredModels<M>
Auto Trait Implementations§
impl<M> !Freeze for TieredModels<M>
impl<M> RefUnwindSafe for TieredModels<M>
impl<M> Send for TieredModels<M>
impl<M> Sync for TieredModels<M>
impl<M> Unpin for TieredModels<M>
impl<M> UnsafeUnpin for TieredModels<M>
impl<M> UnwindSafe for TieredModels<M>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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