Struct ora_client::Schedules

source ·
pub struct Schedules {
    pub active: Option<bool>,
    pub added_after: Option<OffsetDateTime>,
    pub added_before: Option<OffsetDateTime>,
    pub cancelled_after: Option<OffsetDateTime>,
    pub cancelled_before: Option<OffsetDateTime>,
    pub search: Option<String>,
    pub include_labels: Option<Vec<LabelMatch>>,
    pub kind: Option<String>,
    pub order: ScheduleListOrder,
    pub offset: u64,
    pub limit: u64,
}
Expand description

Search options for retrieving a list of tasks.

Fields§

§active: Option<bool>

Only include schedules that are either active or inactive.

§added_after: Option<OffsetDateTime>

Only include schedules added after the given timestamp (inclusive).

§added_before: Option<OffsetDateTime>

Only include schedules added before the given timestamp (exclusive).

§cancelled_after: Option<OffsetDateTime>

Only include schedules cancelled after the given timestamp (inclusive).

§cancelled_before: Option<OffsetDateTime>

Only include schedules cancelled before the given timestamp (exclusive).

§search: Option<String>

A search text, how it is used is up to the store.

§include_labels: Option<Vec<LabelMatch>>

Include only matching labels.

§kind: Option<String>

Only return schedules that are known to spawn tasks with the given selector kind.

§order: ScheduleListOrder

The way tasks are ordered before applying offset and limit.

§offset: u64

The offset.

§limit: u64

The maximum amount of schedules to fetch.

Implementations§

source§

impl Schedules

source

pub fn all() -> Self

Include all schedules without applying any filters nor limits.

caution: It does include ALL schedules without a limit.

source

pub fn limit(self, limit: u64) -> Self

Set the maximum amount of schedules that are retrieved.

source

pub fn active(self, active: bool) -> Self

Incldue active or inactive schedules only.

source

pub fn with_label(self, label: &str) -> Self

Select schedules that contain the given label with any value.

source

pub fn with_label_value(self, label: &str, value: impl Serialize) -> Self

Select schedules that contain the given label and a specific value.

§Panics

Panics if the given value is not JSON-serializable.

source

pub fn with_worker_selector(self, selector: WorkerSelector) -> Self

Only include schedules with a known matching worker selector.

Trait Implementations§

source§

impl Clone for Schedules

source§

fn clone(&self) -> Schedules

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Schedules

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Schedules

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.