pub struct TableStats {
pub name: String,
pub row_count: u64,
pub avg_row_size: Option<usize>,
pub last_updated: Option<u64>,
/* private fields */
}Expand description
Table statistics
Fields§
§name: StringTable name
row_count: u64Row count
avg_row_size: Option<usize>Average row size in bytes
last_updated: Option<u64>Last updated timestamp
Implementations§
Source§impl TableStats
impl TableStats
Sourcepub fn add_column(&mut self, stats: ColumnStats)
pub fn add_column(&mut self, stats: ColumnStats)
Add column statistics
Sourcepub fn get_column(&self, name: &str) -> Option<&ColumnStats>
pub fn get_column(&self, name: &str) -> Option<&ColumnStats>
Get column statistics
Sourcepub fn column_names(&self) -> Vec<&str>
pub fn column_names(&self) -> Vec<&str>
Get all column names
Sourcepub fn with_avg_row_size(self, size: usize) -> Self
pub fn with_avg_row_size(self, size: usize) -> Self
Set average row size
Sourcepub fn estimated_size(&self) -> Option<u64>
pub fn estimated_size(&self) -> Option<u64>
Estimate table size in bytes
Trait Implementations§
Source§impl Clone for TableStats
impl Clone for TableStats
Source§fn clone(&self) -> TableStats
fn clone(&self) -> TableStats
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 moreAuto Trait Implementations§
impl Freeze for TableStats
impl RefUnwindSafe for TableStats
impl Send for TableStats
impl Sync for TableStats
impl Unpin for TableStats
impl UnsafeUnpin for TableStats
impl UnwindSafe for TableStats
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> 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 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::Request