pub struct ScriptInfo {
pub humble_time: Option<NaiveDateTime>,
pub read_time: ScriptTime,
pub write_time: ScriptTime,
pub neglect_time: Option<ScriptTime>,
pub exec_time: Option<ScriptTime<(String, String, String, Option<PathBuf>)>>,
pub exec_done_time: Option<ScriptTime<(i32, i64)>>,
pub exec_count: u64,
/* private fields */
}Fields§
§humble_time: Option<NaiveDateTime>§read_time: ScriptTime§write_time: ScriptTime§neglect_time: Option<ScriptTime>§exec_time: Option<ScriptTime<(String, String, String, Option<PathBuf>)>>(content, args, env_record, dir)
exec_done_time: Option<ScriptTime<(i32, i64)>>(return code, main event id)
exec_count: u64Implementations§
Source§impl ScriptInfo
impl ScriptInfo
pub fn set_id(&mut self, id: i64)
pub fn cp(&self, new_name: ScriptName) -> Self
Sourcepub fn last_major_time(&self) -> NaiveDateTime
pub fn last_major_time(&self) -> NaiveDateTime
major time 即不包含 read 事件的時間,但包含 humble
Sourcepub fn last_time(&self) -> NaiveDateTime
pub fn last_time(&self) -> NaiveDateTime
不包含 humble
pub fn file_path_fallback(&self) -> PathBuf
pub fn read(&mut self)
pub fn write(&mut self)
pub fn exec( &mut self, content: String, args: &[String], env_record: String, dir: Option<PathBuf>, )
pub fn exec_done(&mut self, code: i32, main_event_id: i64)
pub fn neglect(&mut self)
pub fn builder( id: i64, name: ScriptName, ty: ScriptType, tags: impl Iterator<Item = Tag>, ) -> ScriptBuilder
Trait Implementations§
Source§impl Clone for ScriptInfo
impl Clone for ScriptInfo
Source§fn clone(&self) -> ScriptInfo
fn clone(&self) -> ScriptInfo
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 ScriptInfo
impl Debug for ScriptInfo
Source§impl Deref for ScriptInfo
impl Deref for ScriptInfo
Auto Trait Implementations§
impl Freeze for ScriptInfo
impl RefUnwindSafe for ScriptInfo
impl Send for ScriptInfo
impl Sync for ScriptInfo
impl Unpin for ScriptInfo
impl UnwindSafe for ScriptInfo
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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