Struct hyper_scripter_historian::Historian
source · pub struct Historian { /* private fields */ }
Implementations§
source§impl Historian
impl Historian
pub async fn close(self)
pub async fn new(dir_path: PathBuf) -> Result<Self, DBError>
pub async fn do_migrate(dir_path: &Path) -> Result<(), MigrateError>
pub async fn remove(&self, script_id: i64) -> Result<(), DBError>
pub async fn record(&self, event: &Event<'_>) -> Result<i64, DBError>
pub async fn previous_args( &self, id: i64, dir: Option<&Path> ) -> Result<Option<(String, String)>, DBError>
pub async fn previous_args_list( &self, ids: &[i64], limit: u32, offset: u32, no_humble: bool, dir: Option<&Path> ) -> Result<impl ExactSizeIterator<Item = (i64, String)>, DBError>
pub async fn previous_args_list_with_envs( &self, ids: &[i64], limit: u32, offset: u32, no_humble: bool, dir: Option<&Path> ) -> Result<impl ExactSizeIterator<Item = (i64, String, String)>, DBError>
pub async fn previous_args_list_only_envs( &self, ids: &[i64], limit: u32, offset: u32, no_humble: bool, dir: Option<&Path> ) -> Result<impl ExactSizeIterator<Item = (i64, String)>, DBError>
pub async fn ignore_args_by_id( &self, event_id: NonZeroU64 ) -> Result<Option<LastTimeRecord>, DBError>
pub async fn humble_args_by_id( &self, event_id: NonZeroU64 ) -> Result<Option<LastTimeRecord>, DBError>
pub async fn ignore_args_range( &self, ids: &[i64], dir: Option<&Path>, no_humble: bool, show_env: bool, show_args: bool, min: NonZeroU64, max: Option<NonZeroU64> ) -> Result<Vec<LastTimeRecord>, DBError>
pub async fn amend_args_by_id( &self, event_id: NonZeroU64, args: &str, envs: Option<&str> ) -> Result<(), DBError>
sourcepub async fn clear_except_script_ids(
&self,
script_ids: &[i64]
) -> Result<(), DBError>
pub async fn clear_except_script_ids( &self, script_ids: &[i64] ) -> Result<(), DBError>
除了輸入進來的 script id 外,其它事件通通砍除
pub async fn tidy(&self, script_id: i64) -> Result<(), DBError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Historian
impl RefUnwindSafe for Historian
impl Send for Historian
impl Sync for Historian
impl Unpin for Historian
impl UnwindSafe for Historian
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> 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