Skip to main content

QueryEngine

Struct QueryEngine 

Source
pub struct QueryEngine<'a> { /* private fields */ }
Expand description

Query engine for temporal data.

Implementations§

Source§

impl<'a> QueryEngine<'a>

Source

pub fn new(file: &'a TimeFile) -> Self

Create a new query engine over a TimeFile.

Source

pub fn overdue_deadlines(&self) -> TimeResult<Vec<Deadline>>

Get all overdue deadlines.

Source

pub fn deadlines_due_within( &self, duration: ChronoDuration, ) -> TimeResult<Vec<Deadline>>

Get deadlines due within a given duration from now.

Source

pub fn deadlines_by_status( &self, status: DeadlineStatus, ) -> TimeResult<Vec<Deadline>>

Get deadlines by status.

Source

pub fn schedules_in_range( &self, start: DateTime<Utc>, end: DateTime<Utc>, ) -> TimeResult<Vec<Schedule>>

Get schedules in a time range.

Source

pub fn schedule_conflicts( &self, schedule: &Schedule, ) -> TimeResult<Vec<Schedule>>

Get conflicting schedules for a proposed schedule.

Source

pub fn available_slots( &self, start: DateTime<Utc>, end: DateTime<Utc>, min_duration: ChronoDuration, ) -> TimeResult<Vec<TimeSlot>>

Get available time slots in a range.

Source

pub fn sequence(&self, id: &TemporalId) -> TimeResult<Option<Sequence>>

Get a sequence by ID.

Source

pub fn active_sequences(&self) -> TimeResult<Vec<Sequence>>

Get all active sequences.

Source

pub fn blocked_sequences(&self) -> TimeResult<Vec<(Sequence, Vec<TemporalId>)>>

Get blocked sequences (steps waiting on dependencies).

Source

pub fn decays_below_threshold( &self, threshold: f64, ) -> TimeResult<Vec<DecayModel>>

Get decay models below a threshold.

Source

pub fn decays_reaching_threshold( &self, threshold: f64, within: ChronoDuration, ) -> TimeResult<Vec<(DecayModel, ChronoDuration)>>

Get decays that will reach threshold within a given duration.

Source

pub fn estimate_total(&self, ids: &[TemporalId]) -> TimeResult<DurationEstimate>

Estimate total duration for a set of tasks.

Source

pub fn stats(&self) -> TimeResult<TimeStats>

Get temporal statistics.

Auto Trait Implementations§

§

impl<'a> Freeze for QueryEngine<'a>

§

impl<'a> RefUnwindSafe for QueryEngine<'a>

§

impl<'a> Send for QueryEngine<'a>

§

impl<'a> Sync for QueryEngine<'a>

§

impl<'a> Unpin for QueryEngine<'a>

§

impl<'a> UnsafeUnpin for QueryEngine<'a>

§

impl<'a> UnwindSafe for QueryEngine<'a>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.