pub struct SessionService;Expand description
Service layer for session-related business logic
Implementations§
Source§impl SessionService
impl SessionService
Sourcepub async fn start_session(
project_id: i64,
context: SessionContext,
) -> Result<Session>
pub async fn start_session( project_id: i64, context: SessionContext, ) -> Result<Session>
Start a new session for a project
Sourcepub async fn stop_session() -> Result<()>
pub async fn stop_session() -> Result<()>
Stop the current active session
Sourcepub async fn get_active_session() -> Result<Option<Session>>
pub async fn get_active_session() -> Result<Option<Session>>
Get the current active session
Sourcepub async fn list_recent_sessions(
limit: Option<usize>,
project_id: Option<i64>,
) -> Result<Vec<Session>>
pub async fn list_recent_sessions( limit: Option<usize>, project_id: Option<i64>, ) -> Result<Vec<Session>>
List recent sessions with optional filtering
Sourcepub async fn get_session_stats(
from_date: Option<DateTime<Utc>>,
to_date: Option<DateTime<Utc>>,
project_id: Option<i64>,
) -> Result<SessionStats>
pub async fn get_session_stats( from_date: Option<DateTime<Utc>>, to_date: Option<DateTime<Utc>>, project_id: Option<i64>, ) -> Result<SessionStats>
Get session statistics for a date range
Sourcepub async fn pause_session() -> Result<()>
pub async fn pause_session() -> Result<()>
Pause the current session
Sourcepub async fn resume_session() -> Result<()>
pub async fn resume_session() -> Result<()>
Resume the current session
Auto Trait Implementations§
impl Freeze for SessionService
impl RefUnwindSafe for SessionService
impl Send for SessionService
impl Sync for SessionService
impl Unpin for SessionService
impl UnwindSafe for SessionService
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