pub struct Job(/* private fields */);
Expand description
A schedulable Job
Implementations§
Source§impl JobLocked
impl JobLocked
Sourcepub fn new<S, T>(schedule: S, run: T) -> Result<JobLocked, JobSchedulerError>
pub fn new<S, T>(schedule: S, run: T) -> Result<JobLocked, JobSchedulerError>
Create a new cron job.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new("0 15 6,8,10 * Mar,Jun Fri 2017", |_uuid, _lock| {
println!("{:?} Hi I ran", chrono::Utc::now());
});
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_tz<S, T, TZ>(
schedule: S,
timezone: TZ,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_tz<S, T, TZ>( schedule: S, timezone: TZ, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new cron job at a timezone.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new("0 15 6,8,10 * Mar,Jun Fri 2017", |_uuid, _lock| {
println!("{:?} Hi I ran", chrono::Utc::now());
});
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_async<S, T>(
schedule: S,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_async<S, T>( schedule: S, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async cron job.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new_async("0 15 6,8,10 * Mar,Jun Fri 2017", |_uuid, _lock| Box::pin( async move {
println!("{:?} Hi I ran", chrono::Utc::now());
}));
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_async_tz<S, T, TZ>(
schedule: S,
timezone: TZ,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_async_tz<S, T, TZ>( schedule: S, timezone: TZ, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async cron job at a timezone.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new_async_tz("0 15 6,8,10 * Mar,Jun Fri 2017", Utc, |_uuid, _lock| Box::pin( async move {
println!("{:?} Hi I ran", chrono::Utc::now());
}));
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_cron_job<S, T, E>(
schedule: S,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_cron_job<S, T, E>( schedule: S, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new cron job.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new_cron_job("0 15 6,8,10 * Mar,Jun Fri 2017", |_uuid, _lock| {
println!("{:?} Hi I ran", chrono::Utc::now());
});
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_cron_job_async<S, T>(
schedule: S,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_cron_job_async<S, T>( schedule: S, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async cron job using UTC as timezone.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new("0 15 6,8,10 * Mar,Jun Fri 2017", |_uuid, _lock| Box::pin( async move {
println!("{:?} Hi I ran", chrono::Utc::now());
}));
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_cron_job_async_tz<S, T, TZ>(
schedule: S,
timezone: TZ,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_cron_job_async_tz<S, T, TZ>( schedule: S, timezone: TZ, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async cron job using a specified timezone.
let mut sched = JobScheduler::new();
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let job = Job::new("0 15 6,8,10 * Mar,Jun Fri 2017", Utc, |_uuid, _lock| Box::pin( async move {
println!("{:?} Hi I ran", chrono::Utc::now());
}));
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_one_shot<T>(
duration: Duration,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_one_shot<T>( duration: Duration, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new one shot job.
This will schedule a job that is only run once after the duration has passed.
let mut sched = JobScheduler::new();
let job = Job::new_one_shot(Duration::from_secs(18), |_uuid, _l| {
println!("{:?} I'm only run once", chrono::Utc::now());
}
sched.add(job)
tokio::spawn(sched.start());
Above will run the code after 18 seconds, only once
Sourcepub fn new_one_shot_async<T>(
duration: Duration,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_one_shot_async<T>( duration: Duration, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async one shot job.
This will schedule a job that is only run once after the duration has passed.
let mut sched = JobScheduler::new();
let job = Job::new_one_shot_async(Duration::from_secs(16), |_uuid, _l| {
Box::pin(async move {
info!("I'm only run once async");
})
})
.unwrap();
sched.add(job)
tokio::spawn(sched.start());
Above will run the code after 18 seconds, only once
Sourcepub fn new_one_shot_at_instant<T>(
instant: Instant,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_one_shot_at_instant<T>( instant: Instant, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new one shot job that runs at an instant
// Run after 20 seconds
let mut sched = JobScheduler::new();
let instant = std::time::Instant::now().checked_add(std::time::Duration::from_secs(20));
let job = Job::new_one_shot_at_instant(instant, |_uuid, _lock| println!("I run once after 20 seconds") );
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_one_shot_at_instant_async<T>(
instant: Instant,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_one_shot_at_instant_async<T>( instant: Instant, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async one shot job that runs at an instant
// Run after 20 seconds
let mut sched = JobScheduler::new();
let instant = std::time::Instant::now().checked_add(std::time::Duration::from_secs(20));
let job = Job::new_one_shot_at_instant(instant, |_uuid, _lock| Box::pin(async move {println!("I run once after 20 seconds")}) );
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_repeated<T>(
duration: Duration,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_repeated<T>( duration: Duration, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new repeated job.
This is checked if it is running only after 500ms in 500ms intervals.
let mut sched = JobScheduler::new();
let job = Job::new_repeated(Duration::from_secs(8), |_uuid, _lock| {
println!("{:?} I'm repeated every 8 seconds", chrono::Utc::now());
}
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn new_repeated_async<T>(
duration: Duration,
run: T,
) -> Result<JobLocked, JobSchedulerError>
pub fn new_repeated_async<T>( duration: Duration, run: T, ) -> Result<JobLocked, JobSchedulerError>
Create a new async repeated job.
This is checked if it is running only after 500ms in 500ms intervals.
let mut sched = JobScheduler::new();
let job = Job::new_repeated_async(Duration::from_secs(8), |_uuid, _lock| Box::pin(async move {
println!("{:?} I'm repeated every 8 seconds", chrono::Utc::now());
}));
sched.add(job)
tokio::spawn(sched.start());
Sourcepub fn tick(&mut self) -> Result<bool, JobSchedulerError>
pub fn tick(&mut self) -> Result<bool, JobSchedulerError>
The tick
method returns a true if there was an invocation needed after it was last called
This method will also change the last tick on itself
Sourcepub async fn on_notifications_add(
&self,
job_scheduler: &JobsSchedulerLocked,
run: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>,
states: Vec<JobState>,
) -> Result<Uuid, JobSchedulerError>
pub async fn on_notifications_add( &self, job_scheduler: &JobsSchedulerLocked, run: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, states: Vec<JobState>, ) -> Result<Uuid, JobSchedulerError>
Add a notification to run on a list of state notifications
Sourcepub async fn on_start_notification_add(
&self,
job_scheduler: &JobsSchedulerLocked,
on_start: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>,
) -> Result<Uuid, JobSchedulerError>
pub async fn on_start_notification_add( &self, job_scheduler: &JobsSchedulerLocked, on_start: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, ) -> Result<Uuid, JobSchedulerError>
Run something when the task is started. Returns a UUID as handle for this notification. This
UUID needs to be used when you want to remove the notification handle using on_start_notification_remove
.
Sourcepub async fn on_notification_removal(
&self,
job_scheduler: &JobsSchedulerLocked,
notification_id: &Uuid,
states: Option<Vec<JobState>>,
) -> Result<(Uuid, bool), JobSchedulerError>
pub async fn on_notification_removal( &self, job_scheduler: &JobsSchedulerLocked, notification_id: &Uuid, states: Option<Vec<JobState>>, ) -> Result<(Uuid, bool), JobSchedulerError>
Remove a notification optionally for a certain type of states
Sourcepub async fn on_start_notification_remove(
&self,
job_scheduler: &JobsSchedulerLocked,
notification_id: &Uuid,
) -> Result<bool, JobSchedulerError>
pub async fn on_start_notification_remove( &self, job_scheduler: &JobsSchedulerLocked, notification_id: &Uuid, ) -> Result<bool, JobSchedulerError>
Remove the notification when the task was started. Uses the same UUID that was returned by
on_start_notification_add
Sourcepub async fn on_done_notification_add(
&mut self,
job_scheduler: &JobsSchedulerLocked,
on_stop: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>,
) -> Result<Uuid, JobSchedulerError>
pub async fn on_done_notification_add( &mut self, job_scheduler: &JobsSchedulerLocked, on_stop: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, ) -> Result<Uuid, JobSchedulerError>
Run something when the task is stopped. Returns a UUID as handle for this notification. This
UUID needs to be used when you want to remove the notification handle using on_stop_notification_remove
.
Sourcepub async fn on_done_notification_remove(
&mut self,
job_scheduler: &JobsSchedulerLocked,
notification_id: &Uuid,
) -> Result<bool, JobSchedulerError>
pub async fn on_done_notification_remove( &mut self, job_scheduler: &JobsSchedulerLocked, notification_id: &Uuid, ) -> Result<bool, JobSchedulerError>
Remove the notification when the task was stopped. Uses the same UUID that was returned by
on_done_notification_add
Sourcepub async fn on_removed_notification_add(
&mut self,
job_scheduler: &JobsSchedulerLocked,
on_removed: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>,
) -> Result<Uuid, JobSchedulerError>
pub async fn on_removed_notification_add( &mut self, job_scheduler: &JobsSchedulerLocked, on_removed: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, ) -> Result<Uuid, JobSchedulerError>
Run something when the task was removed. Returns a UUID as handle for this notification. This
UUID needs to be used when you want to remove the notification handle using on_removed_notification_remove
.
Sourcepub async fn on_removed_notification_remove(
&mut self,
job_scheduler: &JobsSchedulerLocked,
notification_id: &Uuid,
) -> Result<bool, JobSchedulerError>
pub async fn on_removed_notification_remove( &mut self, job_scheduler: &JobsSchedulerLocked, notification_id: &Uuid, ) -> Result<bool, JobSchedulerError>
Remove the notification when the task was removed. Uses the same UUID that was returned by
on_removed_notification_add
Sourcepub async fn on_stop_notification_add(
&mut self,
job_scheduler: &JobsSchedulerLocked,
on_removed: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>,
) -> Result<Uuid, JobSchedulerError>
pub async fn on_stop_notification_add( &mut self, job_scheduler: &JobsSchedulerLocked, on_removed: Box<dyn FnMut(Uuid, Uuid, JobState) -> Pin<Box<dyn Future<Output = ()> + Send>> + Sync + Send>, ) -> Result<Uuid, JobSchedulerError>
Run something when the task was removed. Returns a UUID as handle for this notification. This
UUID needs to be used when you want to remove the notification handle using on_removed_notification_remove
.
Sourcepub async fn on_stop_notification_remove(
&mut self,
job_scheduler: &JobsSchedulerLocked,
notification_id: &Uuid,
) -> Result<bool, JobSchedulerError>
pub async fn on_stop_notification_remove( &mut self, job_scheduler: &JobsSchedulerLocked, notification_id: &Uuid, ) -> Result<bool, JobSchedulerError>
Remove the notification when the task was removed. Uses the same UUID that was returned by
on_removed_notification_add
Sourcepub fn set_job_data(
&mut self,
job_data: JobStoredData,
) -> Result<(), JobSchedulerError>
pub fn set_job_data( &mut self, job_data: JobStoredData, ) -> Result<(), JobSchedulerError>
Override the job’s data for use in data storage
Sourcepub fn set_stop(&mut self, stop: bool) -> Result<(), JobSchedulerError>
pub fn set_stop(&mut self, stop: bool) -> Result<(), JobSchedulerError>
Set whether this job has been stopped
Sourcepub fn job_data(&mut self) -> Result<JobStoredData, JobSchedulerError>
pub fn job_data(&mut self) -> Result<JobStoredData, JobSchedulerError>
Get the job data
pub fn schedule_to_cron<T>(schedule: T) -> Result<String, JobSchedulerError>where
T: ToString,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobLocked
impl RefUnwindSafe for JobLocked
impl Send for JobLocked
impl Sync for JobLocked
impl Unpin for JobLocked
impl UnwindSafe for JobLocked
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.