pub struct ProjectHistory {
pub last_script: Option<String>,
pub last_run: DateTime<Utc>,
pub scripts: HashMap<String, ScriptHistory>,
}Expand description
History for a project.
Fields§
§last_script: Option<String>Last script executed in this project.
last_run: DateTime<Utc>Last time any script was run in this project.
scripts: HashMap<String, ScriptHistory>History for each script.
Implementations§
Source§impl ProjectHistory
impl ProjectHistory
Sourcepub fn record_run(&mut self, script: &str, args: Option<String>)
pub fn record_run(&mut self, script: &str, args: Option<String>)
Record a script execution.
Sourcepub fn last_script(&self) -> Option<&str>
pub fn last_script(&self) -> Option<&str>
Get the last executed script name.
Sourcepub fn last_script_with_args(&self) -> Option<(&str, Option<&str>)>
pub fn last_script_with_args(&self) -> Option<(&str, Option<&str>)>
Get the last executed script with its arguments.
Sourcepub fn get_script(&self, name: &str) -> Option<&ScriptHistory>
pub fn get_script(&self, name: &str) -> Option<&ScriptHistory>
Get history for a specific script.
Trait Implementations§
Source§impl Clone for ProjectHistory
impl Clone for ProjectHistory
Source§fn clone(&self) -> ProjectHistory
fn clone(&self) -> ProjectHistory
Returns a duplicate of the value. Read more
1.0.0 · 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 ProjectHistory
impl Debug for ProjectHistory
Source§impl Default for ProjectHistory
impl Default for ProjectHistory
Source§impl<'de> Deserialize<'de> for ProjectHistory
impl<'de> Deserialize<'de> for ProjectHistory
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 ProjectHistory
impl RefUnwindSafe for ProjectHistory
impl Send for ProjectHistory
impl Sync for ProjectHistory
impl Unpin for ProjectHistory
impl UnwindSafe for ProjectHistory
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 more