pub struct DataStoreStats {
pub entry_count: usize,
pub max_entries: usize,
pub max_entry_size: usize,
pub metrics_enabled: bool,
pub total_size_bytes: usize,
pub avg_entry_size_bytes: usize,
pub capacity_usage_percent: f64,
pub memory_alert_threshold: f64,
pub memory_alert_triggered: bool,
}Expand description
A WASM wrapper for the Rust cedarling::DataStoreStats struct.
Statistics about the DataStore.
Fields§
§entry_count: usizeNumber of entries currently stored
max_entries: usizeMaximum number of entries allowed (0 = unlimited)
max_entry_size: usizeMaximum size per entry in bytes (0 = unlimited)
metrics_enabled: boolWhether metrics tracking is enabled
total_size_bytes: usizeTotal size of all entries in bytes (approximate, based on JSON serialization)
avg_entry_size_bytes: usizeAverage size per entry in bytes (0 if no entries)
capacity_usage_percent: f64Percentage of capacity used (0.0-100.0, based on entry count)
memory_alert_threshold: f64Memory usage threshold percentage (from config)
memory_alert_triggered: boolWhether memory usage exceeds the alert threshold
Implementations§
Source§impl DataStoreStats
impl DataStoreStats
Sourcepub fn json_string(&self) -> String
pub fn json_string(&self) -> String
Convert DataStoreStats to json string value
Trait Implementations§
Source§impl From<DataStoreStats> for JsValue
impl From<DataStoreStats> for JsValue
Source§fn from(value: DataStoreStats) -> Self
fn from(value: DataStoreStats) -> Self
Converts to this type from the input type.
Source§impl From<DataStoreStats> for DataStoreStats
impl From<DataStoreStats> for DataStoreStats
Source§impl FromWasmAbi for DataStoreStats
impl FromWasmAbi for DataStoreStats
Source§impl IntoWasmAbi for DataStoreStats
impl IntoWasmAbi for DataStoreStats
Source§impl LongRefFromWasmAbi for DataStoreStats
impl LongRefFromWasmAbi for DataStoreStats
Source§type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<DataStoreStats>
type Anchor = RcRef<DataStoreStats>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for DataStoreStats
impl OptionFromWasmAbi for DataStoreStats
Source§impl OptionIntoWasmAbi for DataStoreStats
impl OptionIntoWasmAbi for DataStoreStats
Source§impl RefFromWasmAbi for DataStoreStats
impl RefFromWasmAbi for DataStoreStats
Source§type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<DataStoreStats>
type Anchor = RcRef<DataStoreStats>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for DataStoreStats
impl RefMutFromWasmAbi for DataStoreStats
Source§type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
type Abi = WasmPtr<WasmRefCell<DataStoreStats>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<DataStoreStats>
type Anchor = RcRefMut<DataStoreStats>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl Serialize for DataStoreStats
impl Serialize for DataStoreStats
impl SupportsConstructor for DataStoreStats
impl SupportsInstanceProperty for DataStoreStats
impl SupportsStaticProperty for DataStoreStats
Source§impl TryFromJsValue for DataStoreStats
impl TryFromJsValue for DataStoreStats
Source§impl VectorFromWasmAbi for DataStoreStats
impl VectorFromWasmAbi for DataStoreStats
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[DataStoreStats]>
Source§impl VectorIntoWasmAbi for DataStoreStats
impl VectorIntoWasmAbi for DataStoreStats
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[DataStoreStats]>) -> Self::Abi
Source§impl WasmDescribeVector for DataStoreStats
impl WasmDescribeVector for DataStoreStats
Auto Trait Implementations§
impl Freeze for DataStoreStats
impl RefUnwindSafe for DataStoreStats
impl Send for DataStoreStats
impl Sync for DataStoreStats
impl Unpin for DataStoreStats
impl UnsafeUnpin for DataStoreStats
impl UnwindSafe for DataStoreStats
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.