pub struct DelayedJobsClient { /* private fields */ }Expand description
Access to the /v1/clockwork/delayed endpoints.
Obtain via Clockwork::delayed.
Implementations§
Source§impl DelayedJobsClient
impl DelayedJobsClient
Sourcepub async fn list(&self) -> Result<Vec<DelayedJob>, Error>
pub async fn list(&self) -> Result<Vec<DelayedJob>, Error>
List all delayed jobs.
Maps to GET /v1/clockwork/delayed.
§Example
use nautilus_rs::Clockwork;
let clockwork = Clockwork::new("vrn_clockwork_live_sk_…");
for job in clockwork.delayed().list().await? {
println!("{} runs at {}", job.name, job.run_at);
}Sourcepub async fn create(
&self,
params: CreateDelayedJobParams,
) -> Result<DelayedJob, Error>
pub async fn create( &self, params: CreateDelayedJobParams, ) -> Result<DelayedJob, Error>
Schedule a new one-off delayed job.
Maps to POST /v1/clockwork/delayed.
§Example
use nautilus_rs::{Clockwork, CreateDelayedJobParams};
let clockwork = Clockwork::new("vrn_clockwork_live_sk_…");
let job = clockwork.delayed().create(CreateDelayedJobParams {
name: "send-reminder".into(),
run_at: "2026-01-01T12:00:00Z".into(),
url: "https://example.com/hooks/reminder".into(),
..Default::default()
}).await?;
println!("scheduled job {}", job.id);Auto Trait Implementations§
impl !RefUnwindSafe for DelayedJobsClient
impl !UnwindSafe for DelayedJobsClient
impl Freeze for DelayedJobsClient
impl Send for DelayedJobsClient
impl Sync for DelayedJobsClient
impl Unpin for DelayedJobsClient
impl UnsafeUnpin for DelayedJobsClient
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