pub struct BundleConfig {
pub compress: bool,
pub max_memory: usize,
pub page_size: usize,
pub prefetch: bool,
}Expand description
Configuration for model bundle creation and loading.
Fields§
§compress: boolEnable compression for model weights.
max_memory: usizeMaximum memory for paged loading (bytes).
page_size: usizePage size for paging (bytes).
prefetch: boolEnable pre-fetching of components.
Implementations§
Source§impl BundleConfig
impl BundleConfig
Sourcepub fn with_compression(self, compress: bool) -> Self
pub fn with_compression(self, compress: bool) -> Self
Enable or disable compression.
Sourcepub fn with_max_memory(self, max_memory: usize) -> Self
pub fn with_max_memory(self, max_memory: usize) -> Self
Set maximum memory for paged loading.
Sourcepub fn with_page_size(self, page_size: usize) -> Self
pub fn with_page_size(self, page_size: usize) -> Self
Set page size for paging.
Sourcepub fn with_prefetch(self, prefetch: bool) -> Self
pub fn with_prefetch(self, prefetch: bool) -> Self
Enable or disable pre-fetching.
Trait Implementations§
Source§impl Clone for BundleConfig
impl Clone for BundleConfig
Source§fn clone(&self) -> BundleConfig
fn clone(&self) -> BundleConfig
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 BundleConfig
impl Debug for BundleConfig
Auto Trait Implementations§
impl Freeze for BundleConfig
impl RefUnwindSafe for BundleConfig
impl Send for BundleConfig
impl Sync for BundleConfig
impl Unpin for BundleConfig
impl UnwindSafe for BundleConfig
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> 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