pub struct RetargetConfig {
pub weight_scale: f32,
pub unmapped_policy: UnmappedPolicy,
pub prefix: String,
pub clamp_output: bool,
}Expand description
Full configuration for retarget_weights.
Fields§
§weight_scale: f32Multiplier applied to every output weight (default 1.0).
unmapped_policy: UnmappedPolicyBehaviour for keys absent from the RetargetMap.
prefix: StringPrefix used when unmapped_policy is UnmappedPolicy::MapToPrefix.
clamp_output: boolClamp output weights to [0.0, 1.0].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetargetConfig
impl RefUnwindSafe for RetargetConfig
impl Send for RetargetConfig
impl Sync for RetargetConfig
impl Unpin for RetargetConfig
impl UnsafeUnpin for RetargetConfig
impl UnwindSafe for RetargetConfig
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> 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