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
§Required features
This function requires the tokio-support feature of the delay_timer
crate to be enabled.
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
§Required features
This function requires the status-report feature of the delay_timer
crate to be enabled.
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