pub struct Schedule {
pub method: MethodOrId,
pub interval: u64,
pub delay: u64,
}Expand description
Schedules are functions that are executed periodically.
This struct is the equivalent of CallAction, just for schedules.
Internally all schedules are just actions without any input parameters.
They are executed by injecting a CallAction object with the correct method name and an empty params field.
Like CallAction the Schedule struct is always serialized and deserialized as json.
Fields§
§method: MethodOrIdMethod that is called periodically
interval: u64Schedule interval in milliseconds
delay: u64Delay in milliseconds for the first schedule execution. Defaults to 0.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schedule
impl<'de> Deserialize<'de> for Schedule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnwindSafe for Schedule
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