pub struct ScriptJobView {
pub script: String,
pub every_secs: u64,
pub cron: Option<String>,
pub enabled: bool,
}Expand description
One scheduled script: a project file the engine runs on a timer.
The engine runs it, not a window, so a cadence a person set goes on being honoured after they close the window (ADR-0018). A schedule that only fires while someone is watching is not a schedule.
Fields§
§script: StringRelative to the project folder, and what identifies the schedule: one schedule per script.
every_secs: u64The cadence when cron is unset. Kept either way, so switching to a
cron expression and back does not lose what the interval was.
cron: Option<String>A cron expression, as the person wrote it. When set it decides when the
script runs and every_secs is not consulted.
enabled: boolImplementations§
Trait Implementations§
Source§impl Clone for ScriptJobView
impl Clone for ScriptJobView
Source§impl Debug for ScriptJobView
impl Debug for ScriptJobView
Source§impl Default for ScriptJobView
impl Default for ScriptJobView
Source§impl<'de> Deserialize<'de> for ScriptJobView
impl<'de> Deserialize<'de> for ScriptJobView
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
impl Eq for ScriptJobView
Source§impl Hash for ScriptJobView
impl Hash for ScriptJobView
Source§impl Message for ScriptJobView
impl Message for ScriptJobView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ScriptJobView
impl PartialEq for ScriptJobView
Source§impl Serialize for ScriptJobView
impl Serialize for ScriptJobView
impl StructuralPartialEq for ScriptJobView
Auto Trait Implementations§
impl Freeze for ScriptJobView
impl RefUnwindSafe for ScriptJobView
impl Send for ScriptJobView
impl Sync for ScriptJobView
impl Unpin for ScriptJobView
impl UnsafeUnpin for ScriptJobView
impl UnwindSafe for ScriptJobView
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