pub struct SessionStatsBuilder { /* private fields */ }Expand description
Builder pattern for SessionStats
Implementations§
Source§impl SessionStatsBuilder
impl SessionStatsBuilder
Sourcepub fn new(
session_id: Uuid,
created_at: DateTime<Utc>,
last_updated: DateTime<Utc>,
) -> SessionStatsBuilder
pub fn new( session_id: Uuid, created_at: DateTime<Utc>, last_updated: DateTime<Utc>, ) -> SessionStatsBuilder
Create a new builder with the required identity and timestamp fields.
Sourcepub fn with_context_sizes(
self,
hot: usize,
warm: usize,
cold: usize,
) -> SessionStatsBuilder
pub fn with_context_sizes( self, hot: usize, warm: usize, cold: usize, ) -> SessionStatsBuilder
Set the hot, warm, and cold context tier sizes.
Sourcepub fn with_counts(
self,
updates: usize,
entities: usize,
decisions: usize,
) -> SessionStatsBuilder
pub fn with_counts( self, updates: usize, entities: usize, decisions: usize, ) -> SessionStatsBuilder
Set total update, entity, and decision counts.
Sourcepub fn with_references(
self,
questions: usize,
concepts: usize,
code_refs: usize,
) -> SessionStatsBuilder
pub fn with_references( self, questions: usize, concepts: usize, code_refs: usize, ) -> SessionStatsBuilder
Set question, concept, and code reference counts.
Sourcepub fn build(self) -> SessionStats
pub fn build(self) -> SessionStats
Consume the builder and produce a SessionStats.
Auto Trait Implementations§
impl Freeze for SessionStatsBuilder
impl RefUnwindSafe for SessionStatsBuilder
impl Send for SessionStatsBuilder
impl Sync for SessionStatsBuilder
impl Unpin for SessionStatsBuilder
impl UnsafeUnpin for SessionStatsBuilder
impl UnwindSafe for SessionStatsBuilder
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request