Struct delay_timer::entity::DelayTimerBuilder
source · pub struct DelayTimerBuilder { /* private fields */ }
Expand description
Builds DelayTimer with custom configuration values.
Methods can be chained in order to set the configuration values. The
DelayTimer is constructed by calling build
.
Examples
use delay_timer::entity::DelayTimerBuilder;
Implementations§
source§impl DelayTimerBuilder
impl DelayTimerBuilder
sourcepub fn build(self) -> DelayTimer
pub fn build(self) -> DelayTimer
Build DelayTimer.
source§impl DelayTimerBuilder
impl DelayTimerBuilder
Required features
This function requires the tokio-support
feature of the delay_timer
crate to be enabled.
sourcepub fn smol_runtime_by_default(self) -> Self
pub fn smol_runtime_by_default(self) -> Self
With this API, DelayTimer
use default Smol-Runtime
is generated internally.
sourcepub fn tokio_runtime_by_default(self) -> Self
pub fn tokio_runtime_by_default(self) -> Self
With this API, DelayTimer
use default TokioRuntime
is generated internally.
By default the internal runtime is Tokio
, this API does not require a user-initiated call.
sourcepub fn tokio_runtime_by_custom(self, rt: Runtime) -> Self
pub fn tokio_runtime_by_custom(self, rt: Runtime) -> Self
With this API, DelayTimer
internally use the user customized and independent TokioRuntime
.
With this api, DelayTimer
internal will share a TokioRuntime
with the user .
source§impl DelayTimerBuilder
impl DelayTimerBuilder
Required features
This function requires the status-report
feature of the delay_timer
crate to be enabled.
sourcepub fn enable_status_report(self) -> Self
Available on crate feature status-report
only.
pub fn enable_status_report(self) -> Self
status-report
only.Whether to expose public events.
Trait Implementations§
source§impl Clone for DelayTimerBuilder
impl Clone for DelayTimerBuilder
source§fn clone(&self) -> DelayTimerBuilder
fn clone(&self) -> DelayTimerBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more