pub struct EventManager<'a> { /* private fields */ }Implementations§
Source§impl<'a> EventManager<'a>
impl<'a> EventManager<'a>
pub fn new(pool: &'a SqlitePool) -> Self
Sourcepub async fn add_event(
&self,
task_id: i64,
log_type: &str,
discussion_data: &str,
) -> Result<Event>
pub async fn add_event( &self, task_id: i64, log_type: &str, discussion_data: &str, ) -> Result<Event>
Add a new event
Sourcepub async fn list_events(
&self,
task_id: Option<i64>,
limit: Option<i64>,
log_type: Option<String>,
since: Option<String>,
) -> Result<Vec<Event>>
pub async fn list_events( &self, task_id: Option<i64>, limit: Option<i64>, log_type: Option<String>, since: Option<String>, ) -> Result<Vec<Event>>
List events for a task (or globally if task_id is None)
Sourcepub async fn search_events_fts5(
&self,
query: &str,
limit: Option<i64>,
) -> Result<Vec<EventSearchResult>>
pub async fn search_events_fts5( &self, query: &str, limit: Option<i64>, ) -> Result<Vec<EventSearchResult>>
Search events using FTS5
Auto Trait Implementations§
impl<'a> Freeze for EventManager<'a>
impl<'a> !RefUnwindSafe for EventManager<'a>
impl<'a> Send for EventManager<'a>
impl<'a> Sync for EventManager<'a>
impl<'a> Unpin for EventManager<'a>
impl<'a> !UnwindSafe for EventManager<'a>
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