pub struct SessionHandle { /* private fields */ }Expand description
Handle to a specific session, providing access to its data.
Implementations§
Source§impl SessionHandle
impl SessionHandle
Sourcepub fn from_events(events: Vec<AgentEvent>) -> Self
pub fn from_events(events: Vec<AgentEvent>) -> Self
Create a SessionHandle from raw events (for testing, simulations, custom pipelines).
This allows you to use SessionHandle API without a Client connection.
§Examples
use agtrace_sdk::{SessionHandle, types::AgentEvent};
let events: Vec<AgentEvent> = vec![/* ... */];
let handle = SessionHandle::from_events(events);
let session = handle.assemble()?;
let summary = handle.summarize()?;Sourcepub fn events(&self) -> Result<Vec<AgentEvent>>
pub fn events(&self) -> Result<Vec<AgentEvent>>
Load raw events for this session.
Sourcepub fn assemble(&self) -> Result<AgentSession>
pub fn assemble(&self) -> Result<AgentSession>
Assemble events into a structured session.
Sourcepub fn export(&self, strategy: ExportStrategy) -> Result<Vec<AgentEvent>>
pub fn export(&self, strategy: ExportStrategy) -> Result<Vec<AgentEvent>>
Export session with specified strategy.
Sourcepub fn summarize(&self) -> Result<SessionSummary>
pub fn summarize(&self) -> Result<SessionSummary>
Summarize session statistics.
Sourcepub fn analyze(&self) -> Result<SessionAnalyzer>
pub fn analyze(&self) -> Result<SessionAnalyzer>
Analyze session with diagnostic lenses.
Sourcepub fn summary(&self) -> Result<SessionSummary>
👎Deprecated: Use summarize() instead
pub fn summary(&self) -> Result<SessionSummary>
Get session summary (legacy compatibility).
Auto Trait Implementations§
impl Freeze for SessionHandle
impl RefUnwindSafe for SessionHandle
impl Send for SessionHandle
impl Sync for SessionHandle
impl Unpin for SessionHandle
impl UnwindSafe for SessionHandle
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