pub enum ScheduleAt {
Interval(TimeDuration),
Time(Timestamp),
}Expand description
When a scheduled reducer should execute, either at a specific point in time, or at regular intervals for repeating schedules.
Stored in reducer-scheduling tables as a column.
This is a special type.
Variants§
Interval(TimeDuration)
A regular interval at which the repeated reducer is scheduled.
Value is a TimeDuration, which has nanosecond precision.
Time(Timestamp)
A specific time to which the reducer is scheduled.
Implementations§
Source§impl ScheduleAt
impl ScheduleAt
Sourcepub fn to_duration_from(&self, from: Timestamp) -> Duration
pub fn to_duration_from(&self, from: Timestamp) -> Duration
Converts the ScheduleAt to a std::time::Duration from now.
Returns std::time::Duration::ZERO if self represents a time in the past.
Sourcepub fn to_timestamp_from(&self, from: Timestamp) -> Timestamp
pub fn to_timestamp_from(&self, from: Timestamp) -> Timestamp
Converts the ScheduleAt to a Timestamp.
If self is an interval, returns from + dur.
Sourcepub fn get_type() -> AlgebraicType
pub fn get_type() -> AlgebraicType
Get the special AlgebraicType for ScheduleAt.
Trait Implementations§
Source§impl Clone for ScheduleAt
impl Clone for ScheduleAt
Source§fn clone(&self) -> ScheduleAt
fn clone(&self) -> ScheduleAt
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScheduleAt
impl Debug for ScheduleAt
Source§impl<'de> Deserialize<'de> for ScheduleAt
impl<'de> Deserialize<'de> for ScheduleAt
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given
deserializer.Source§impl From<Duration> for ScheduleAt
impl From<Duration> for ScheduleAt
Source§impl From<SystemTime> for ScheduleAt
impl From<SystemTime> for ScheduleAt
Source§fn from(value: SystemTime) -> Self
fn from(value: SystemTime) -> Self
Converts to this type from the input type.
Source§impl From<TimeDuration> for ScheduleAt
impl From<TimeDuration> for ScheduleAt
Source§fn from(value: TimeDuration) -> Self
fn from(value: TimeDuration) -> Self
Converts to this type from the input type.
Source§impl From<Timestamp> for ScheduleAt
impl From<Timestamp> for ScheduleAt
Source§impl GroundSpacetimeType for ScheduleAt
impl GroundSpacetimeType for ScheduleAt
Source§fn get_type() -> AlgebraicType
fn get_type() -> AlgebraicType
Returns the
AlgebraicType representation of Self.Source§impl PartialEq for ScheduleAt
impl PartialEq for ScheduleAt
Source§fn eq(&self, other: &ScheduleAt) -> bool
fn eq(&self, other: &ScheduleAt) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScheduleAt
impl Serialize for ScheduleAt
Source§impl SpacetimeType for ScheduleAt
impl SpacetimeType for ScheduleAt
Source§fn make_type<S: TypespaceBuilder>(_ts: &mut S) -> AlgebraicType
fn make_type<S: TypespaceBuilder>(_ts: &mut S) -> AlgebraicType
Returns an
AlgebraicType representing the type for Self in SATS
and in the typing context in typespace. This is used by the
automatic type registration system in Rust modules. Read moreSource§impl TryFrom<AlgebraicValue> for ScheduleAt
impl TryFrom<AlgebraicValue> for ScheduleAt
Source§type Error = ValueDeserializeError
type Error = ValueDeserializeError
The type returned in the event of a conversion error.
impl Copy for ScheduleAt
impl Eq for ScheduleAt
impl StructuralPartialEq for ScheduleAt
Auto Trait Implementations§
impl Freeze for ScheduleAt
impl RefUnwindSafe for ScheduleAt
impl Send for ScheduleAt
impl Sync for ScheduleAt
impl Unpin for ScheduleAt
impl UnsafeUnpin for ScheduleAt
impl UnwindSafe for ScheduleAt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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> Satn for T
impl<T> Satn for T
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the SATN data format into the formatter
f.Source§fn fmt_psql(
&self,
f: &mut Formatter<'_>,
ty: &PsqlType<'_>,
) -> Result<(), Error>
fn fmt_psql( &self, f: &mut Formatter<'_>, ty: &PsqlType<'_>, ) -> Result<(), Error>
Formats the value using the postgres SATN(PsqlFormatter { f }, /* PsqlType */) formatter
f.Source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
Formats the value using the SATN data format into the returned
String.Source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
Pretty prints the value using the SATN data format into the returned
String.