pub struct MultiModelConfig { /* private fields */ }Expand description
Multi-model manager configuration
Implementations§
Source§impl MultiModelConfig
impl MultiModelConfig
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a configuration optimized for development
Sourcepub fn production() -> Self
pub fn production() -> Self
Create a configuration optimized for production
Sourcepub fn set_max_concurrent_models(self, max: usize) -> Self
pub fn set_max_concurrent_models(self, max: usize) -> Self
Set maximum concurrent models
Sourcepub fn set_max_memory_usage_mb(self, mb: u32) -> Self
pub fn set_max_memory_usage_mb(self, mb: u32) -> Self
Set maximum memory usage in MB
Sourcepub fn set_auto_unload_inactive(self, enabled: bool) -> Self
pub fn set_auto_unload_inactive(self, enabled: bool) -> Self
Enable/disable auto-unloading of inactive models
Sourcepub fn set_inactive_timeout_ms(self, timeout: u32) -> Self
pub fn set_inactive_timeout_ms(self, timeout: u32) -> Self
Set inactive timeout in milliseconds
Sourcepub fn set_enable_preloading(self, enabled: bool) -> Self
pub fn set_enable_preloading(self, enabled: bool) -> Self
Enable/disable model preloading
Trait Implementations§
Source§impl Clone for MultiModelConfig
impl Clone for MultiModelConfig
Source§fn clone(&self) -> MultiModelConfig
fn clone(&self) -> MultiModelConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiModelConfig
impl Debug for MultiModelConfig
Source§impl Default for MultiModelConfig
impl Default for MultiModelConfig
Source§impl From<MultiModelConfig> for JsValue
impl From<MultiModelConfig> for JsValue
Source§fn from(value: MultiModelConfig) -> Self
fn from(value: MultiModelConfig) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MultiModelConfig
impl FromWasmAbi for MultiModelConfig
Source§impl IntoWasmAbi for MultiModelConfig
impl IntoWasmAbi for MultiModelConfig
Source§impl OptionFromWasmAbi for MultiModelConfig
impl OptionFromWasmAbi for MultiModelConfig
Source§impl OptionIntoWasmAbi for MultiModelConfig
impl OptionIntoWasmAbi for MultiModelConfig
Source§impl RefFromWasmAbi for MultiModelConfig
impl RefFromWasmAbi for MultiModelConfig
Source§type Anchor = RcRef<MultiModelConfig>
type Anchor = RcRef<MultiModelConfig>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MultiModelConfig
impl RefMutFromWasmAbi for MultiModelConfig
Source§impl TryFromJsValue for MultiModelConfig
impl TryFromJsValue for MultiModelConfig
Source§impl VectorFromWasmAbi for MultiModelConfig
impl VectorFromWasmAbi for MultiModelConfig
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MultiModelConfig]>
Source§impl VectorIntoWasmAbi for MultiModelConfig
impl VectorIntoWasmAbi for MultiModelConfig
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MultiModelConfig]>) -> Self::Abi
Source§impl WasmDescribeVector for MultiModelConfig
impl WasmDescribeVector for MultiModelConfig
impl SupportsConstructor for MultiModelConfig
impl SupportsInstanceProperty for MultiModelConfig
impl SupportsStaticProperty for MultiModelConfig
Auto Trait Implementations§
impl Freeze for MultiModelConfig
impl RefUnwindSafe for MultiModelConfig
impl Send for MultiModelConfig
impl Sync for MultiModelConfig
impl Unpin for MultiModelConfig
impl UnsafeUnpin for MultiModelConfig
impl UnwindSafe for MultiModelConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.