pub struct Tunable<K, Inputs, Output> { /* private fields */ }Expand description
Implementations§
Source§impl<K, Inputs, Output> Tunable<K, Inputs, Output>
impl<K, Inputs, Output> Tunable<K, Inputs, Output>
Sourcepub fn new<Marker>(function: impl IntoTuneFn<Inputs, Output, Marker>) -> Self
pub fn new<Marker>(function: impl IntoTuneFn<Inputs, Output, Marker>) -> Self
Create a new tunable based on a function.
Sourcepub fn group<F: Fn(&K) -> i8 + 'static>(
self,
group: &TuneGroup<K>,
priority: F,
) -> Self
pub fn group<F: Fn(&K) -> i8 + 'static>( self, group: &TuneGroup<K>, priority: F, ) -> Self
Tag the current tunable as part of the given group.
group is a tuning group with a corresponding priority function.
priority is the intra-group priority, applied after the group priority to further sort entries
Groups are tuned in order of priority, and then each entry in the group is tuned based on the intra-group priority. Negative priorities ensure the entry is never tuned for this key.
Auto Trait Implementations§
impl<K, Inputs, Output> Freeze for Tunable<K, Inputs, Output>
impl<K, Inputs, Output> !RefUnwindSafe for Tunable<K, Inputs, Output>
impl<K, Inputs, Output> !Send for Tunable<K, Inputs, Output>
impl<K, Inputs, Output> !Sync for Tunable<K, Inputs, Output>
impl<K, Inputs, Output> Unpin for Tunable<K, Inputs, Output>
impl<K, Inputs, Output> !UnwindSafe for Tunable<K, Inputs, Output>
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