pub struct MonitorHandle { /* private fields */ }Implementations§
Source§impl MonitorHandle
impl MonitorHandle
pub fn new(recent_limit: usize) -> Self
pub fn publish(&self, event: MonitorEvent)
pub fn snapshot(&self) -> MonitorState
pub fn request_started( &self, request_id: impl Into<String>, session_id: Option<String>, session_seq: Option<u64>, endpoint: EndpointKind, )
pub fn project_resolved( &self, request_id: impl Into<String>, project: impl Into<String>, )
pub fn session_sequence_resolved( &self, request_id: impl Into<String>, session_seq: u64, )
pub fn provider_selected( &self, request_id: impl Into<String>, provider: impl Into<String>, model: impl Into<String>, effort: Option<String>, )
pub fn model_resolved( &self, request_id: impl Into<String>, model: impl Into<String>, )
pub fn compaction_started(&self, request_id: impl Into<String>)
pub fn upstream_started(&self, request_id: impl Into<String>)
pub fn generation_started(&self, request_id: impl Into<String>)
pub fn traffic_capture_path(&self, request_id: impl Into<String>, path: PathBuf)
pub fn stream_progress( &self, request_id: impl Into<String>, bytes: u64, chunks: u64, input_tokens: Option<u64>, output_tokens: Option<u64>, )
pub fn usage_updated( &self, request_id: impl Into<String>, input_tokens: Option<u64>, output_tokens: Option<u64>, )
pub fn request_completed( &self, request_id: impl Into<String>, http_status: u16, input_tokens: Option<u64>, output_tokens: Option<u64>, )
pub fn request_failed( &self, request_id: impl Into<String>, http_status: Option<u16>, error: impl Into<String>, )
pub fn request_abandoned( &self, request_id: impl Into<String>, error: impl Into<String>, )
Trait Implementations§
Source§impl Clone for MonitorHandle
impl Clone for MonitorHandle
Source§fn clone(&self) -> MonitorHandle
fn clone(&self) -> MonitorHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MonitorHandle
impl Debug for MonitorHandle
Auto Trait Implementations§
impl Freeze for MonitorHandle
impl RefUnwindSafe for MonitorHandle
impl Send for MonitorHandle
impl Sync for MonitorHandle
impl Unpin for MonitorHandle
impl UnsafeUnpin for MonitorHandle
impl UnwindSafe for MonitorHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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