pub struct LoadWeightsOptions<'a> {
pub resolve: ResolveWeightsOptions<'a>,
pub drain: WeightDrainPolicy,
pub into_map: bool,
}Expand description
Options for load_weights_resolved — prefer crate::weights::LoadOpts presets at call sites.
Fields§
§resolve: ResolveWeightsOptions<'a>§drain: WeightDrainPolicyHow to drain into a WeightMap when into_map is true.
into_map: boolIf true, return a drained WeightMap; if false, return the live loader.
Implementations§
Source§impl<'a> LoadWeightsOptions<'a>
impl<'a> LoadWeightsOptions<'a>
pub fn map() -> LoadWeightsOptions<'a>
pub fn loader() -> LoadWeightsOptions<'a>
pub fn prefer_q4_k_m(self) -> LoadWeightsOptions<'a>
pub fn prefer_substring(self, sub: &'a str) -> LoadWeightsOptions<'a>
pub fn gguf_index(self, idx: usize) -> LoadWeightsOptions<'a>
pub fn drain(self, policy: WeightDrainPolicy) -> LoadWeightsOptions<'a>
pub fn warn_unused(self) -> LoadWeightsOptions<'a>
Trait Implementations§
Source§impl<'a> Clone for LoadWeightsOptions<'a>
impl<'a> Clone for LoadWeightsOptions<'a>
Source§fn clone(&self) -> LoadWeightsOptions<'a>
fn clone(&self) -> LoadWeightsOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for LoadWeightsOptions<'a>
impl<'a> Debug for LoadWeightsOptions<'a>
Source§impl<'a> Default for LoadWeightsOptions<'a>
impl<'a> Default for LoadWeightsOptions<'a>
Source§fn default() -> LoadWeightsOptions<'a>
fn default() -> LoadWeightsOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for LoadWeightsOptions<'a>
impl<'a> RefUnwindSafe for LoadWeightsOptions<'a>
impl<'a> Send for LoadWeightsOptions<'a>
impl<'a> Sync for LoadWeightsOptions<'a>
impl<'a> Unpin for LoadWeightsOptions<'a>
impl<'a> UnsafeUnpin for LoadWeightsOptions<'a>
impl<'a> UnwindSafe for LoadWeightsOptions<'a>
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> 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