pub struct EventStore { /* private fields */ }
Implementations§
source§impl EventStore
impl EventStore
pub fn new() -> Self
pub fn advance_datum(&mut self, duration: Duration)
pub fn read_from_db(&mut self, db: &Database) -> Result<()>
pub fn record_event( &mut self, count: u64, event_id: &str, now: Option<DateTime<Utc>>, ) -> Result<()>
pub fn record_past_event( &mut self, count: u64, event_id: &str, now: Option<DateTime<Utc>>, duration: Duration, ) -> Result<()>
pub fn persist_data(&self, db: &Database) -> Result<()>
pub fn clear(&mut self, db: &Database) -> Result<()>
pub fn query( &mut self, event_id: &str, interval: Interval, num_buckets: usize, starting_bucket: usize, query_type: EventQueryType, ) -> Result<f64>
Trait Implementations§
source§impl Clone for EventStore
impl Clone for EventStore
source§fn clone(&self) -> EventStore
fn clone(&self) -> EventStore
Returns a copy of the value. Read more
1.0.0 · 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 EventStore
impl Debug for EventStore
source§impl Default for EventStore
impl Default for EventStore
source§fn default() -> EventStore
fn default() -> EventStore
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for EventStore
impl<'de> Deserialize<'de> for EventStore
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<HashMap<String, MultiIntervalCounter>> for EventStore
impl From<HashMap<String, MultiIntervalCounter>> for EventStore
source§impl From<Vec<(String, MultiIntervalCounter)>> for EventStore
impl From<Vec<(String, MultiIntervalCounter)>> for EventStore
source§impl Serialize for EventStore
impl Serialize for EventStore
source§impl TryFrom<&Database> for EventStore
impl TryFrom<&Database> for EventStore
source§type Error = NimbusError
type Error = NimbusError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for EventStore
impl RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin for EventStore
impl UnwindSafe for EventStore
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more