pub struct ResourceBasedSlotsOptionsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ResourceBasedSlotsOptionsBuilder<S>
impl<S: State> ResourceBasedSlotsOptionsBuilder<S>
Sourcepub fn build(self) -> ResourceBasedSlotsOptionswhere
S: IsComplete,
pub fn build(self) -> ResourceBasedSlotsOptionswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn target_mem_usage(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetTargetMemUsage<S>>where
S::TargetMemUsage: IsUnset,
pub fn target_mem_usage(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetTargetMemUsage<S>>where
S::TargetMemUsage: IsUnset,
Required.
A value in the range [0.0, 1.0] representing the target memory usage.
Sourcepub fn target_cpu_usage(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetTargetCpuUsage<S>>where
S::TargetCpuUsage: IsUnset,
pub fn target_cpu_usage(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetTargetCpuUsage<S>>where
S::TargetCpuUsage: IsUnset,
Required.
A value in the range [0.0, 1.0] representing the target CPU usage.
Sourcepub fn mem_p_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemPGain<S>>where
S::MemPGain: IsUnset,
pub fn mem_p_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemPGain<S>>where
S::MemPGain: IsUnset,
Optional (Some / Option setters). Default: 5.0.
See pid::Pid::p
Sourcepub fn maybe_mem_p_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemPGain<S>>where
S::MemPGain: IsUnset,
pub fn maybe_mem_p_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemPGain<S>>where
S::MemPGain: IsUnset,
Optional (Some / Option setters). Default: 5.0.
See pid::Pid::p
Sourcepub fn mem_i_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemIGain<S>>where
S::MemIGain: IsUnset,
pub fn mem_i_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemIGain<S>>where
S::MemIGain: IsUnset,
Optional (Some / Option setters). Default: 0.0.
See pid::Pid::i
Sourcepub fn maybe_mem_i_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemIGain<S>>where
S::MemIGain: IsUnset,
pub fn maybe_mem_i_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemIGain<S>>where
S::MemIGain: IsUnset,
Optional (Some / Option setters). Default: 0.0.
See pid::Pid::i
Sourcepub fn mem_d_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemDGain<S>>where
S::MemDGain: IsUnset,
pub fn mem_d_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemDGain<S>>where
S::MemDGain: IsUnset,
Optional (Some / Option setters). Default: 1.0.
See pid::Pid::d
Sourcepub fn maybe_mem_d_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemDGain<S>>where
S::MemDGain: IsUnset,
pub fn maybe_mem_d_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemDGain<S>>where
S::MemDGain: IsUnset,
Optional (Some / Option setters). Default: 1.0.
See pid::Pid::d
Sourcepub fn mem_output_threshold(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemOutputThreshold<S>>where
S::MemOutputThreshold: IsUnset,
pub fn mem_output_threshold(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetMemOutputThreshold<S>>where
S::MemOutputThreshold: IsUnset,
Sourcepub fn maybe_mem_output_threshold(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemOutputThreshold<S>>where
S::MemOutputThreshold: IsUnset,
pub fn maybe_mem_output_threshold(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetMemOutputThreshold<S>>where
S::MemOutputThreshold: IsUnset,
Sourcepub fn cpu_p_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuPGain<S>>where
S::CpuPGain: IsUnset,
pub fn cpu_p_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuPGain<S>>where
S::CpuPGain: IsUnset,
Optional (Some / Option setters). Default: 5.0.
See pid::Pid::d
Sourcepub fn maybe_cpu_p_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuPGain<S>>where
S::CpuPGain: IsUnset,
pub fn maybe_cpu_p_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuPGain<S>>where
S::CpuPGain: IsUnset,
Optional (Some / Option setters). Default: 5.0.
See pid::Pid::d
Sourcepub fn cpu_i_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuIGain<S>>where
S::CpuIGain: IsUnset,
pub fn cpu_i_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuIGain<S>>where
S::CpuIGain: IsUnset,
Optional (Some / Option setters). Default: 0.0.
See pid::Pid::i
Sourcepub fn maybe_cpu_i_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuIGain<S>>where
S::CpuIGain: IsUnset,
pub fn maybe_cpu_i_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuIGain<S>>where
S::CpuIGain: IsUnset,
Optional (Some / Option setters). Default: 0.0.
See pid::Pid::i
Sourcepub fn cpu_d_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuDGain<S>>where
S::CpuDGain: IsUnset,
pub fn cpu_d_gain(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuDGain<S>>where
S::CpuDGain: IsUnset,
Optional (Some / Option setters). Default: 1.0.
See pid::Pid::d
Sourcepub fn maybe_cpu_d_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuDGain<S>>where
S::CpuDGain: IsUnset,
pub fn maybe_cpu_d_gain(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuDGain<S>>where
S::CpuDGain: IsUnset,
Optional (Some / Option setters). Default: 1.0.
See pid::Pid::d
Sourcepub fn cpu_output_threshold(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuOutputThreshold<S>>where
S::CpuOutputThreshold: IsUnset,
pub fn cpu_output_threshold(
self,
value: f64,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuOutputThreshold<S>>where
S::CpuOutputThreshold: IsUnset,
Sourcepub fn maybe_cpu_output_threshold(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuOutputThreshold<S>>where
S::CpuOutputThreshold: IsUnset,
pub fn maybe_cpu_output_threshold(
self,
value: Option<f64>,
) -> ResourceBasedSlotsOptionsBuilder<SetCpuOutputThreshold<S>>where
S::CpuOutputThreshold: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for ResourceBasedSlotsOptionsBuilder<S>
impl<S> RefUnwindSafe for ResourceBasedSlotsOptionsBuilder<S>
impl<S> Send for ResourceBasedSlotsOptionsBuilder<S>
impl<S> Sync for ResourceBasedSlotsOptionsBuilder<S>
impl<S> Unpin for ResourceBasedSlotsOptionsBuilder<S>
impl<S> UnsafeUnpin for ResourceBasedSlotsOptionsBuilder<S>
impl<S> UnwindSafe for ResourceBasedSlotsOptionsBuilder<S>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request