Skip to main content

EnvironmentStore

Trait EnvironmentStore 

Source
pub trait EnvironmentStore: Sync + Send {
Show 14 methods // Required methods fn post_bundle_count(&self) -> Result<usize>; fn post_bundle_metadata_get( &self, location_id: &Id, ) -> Result<Option<PostBundleMetadata>>; fn post_bundle_metadata_put( &self, location_id: &Id, post_bundle_metadata: &PostBundleMetadata, ) -> Result<()>; fn post_bundle_bytes_get(&self, location_id: &Id) -> Result<Option<Bytes>>; fn post_bundle_bytes_put( &self, location_id: &Id, bytes: &[u8], ) -> Result<()>; fn post_bundles_last_accessed_flush( &self, post_bundles_last_accessed: &HashMap<Id, TimeMillis>, ) -> Result<()>; fn post_bundles_delete(&self, location_ids: &[Id]) -> Result<()>; fn post_bundles_last_accessed_iter( &self, location_id: &Id, ) -> Box<dyn Iterator<Item = Result<(Id, TimeMillisBytes), Error>> + '_>; fn config_get_bytes(&self, key: &str) -> Result<Option<Vec<u8>>>; fn config_put_bytes(&self, key: &str, v: Vec<u8>) -> Result<()>; fn post_bundle_feedbacks_bytes_get( &self, post_bundle_location_id: &Id, ) -> Result<Bytes>; fn post_feedback_put_if_more_powerful( &self, location_id: &Id, encoded_post_feedback: &EncodedPostFeedbackV1, ) -> Result<()>; // Provided methods fn config_get_usize(&self, key: &str) -> Result<Option<usize>> { ... } fn config_put_usize(&self, key: &str, v: usize) -> Result<()> { ... }
}

Required Methods§

Source

fn post_bundle_count(&self) -> Result<usize>

Source

fn post_bundle_metadata_get( &self, location_id: &Id, ) -> Result<Option<PostBundleMetadata>>

Source

fn post_bundle_metadata_put( &self, location_id: &Id, post_bundle_metadata: &PostBundleMetadata, ) -> Result<()>

Source

fn post_bundle_bytes_get(&self, location_id: &Id) -> Result<Option<Bytes>>

Source

fn post_bundle_bytes_put(&self, location_id: &Id, bytes: &[u8]) -> Result<()>

Source

fn post_bundles_last_accessed_flush( &self, post_bundles_last_accessed: &HashMap<Id, TimeMillis>, ) -> Result<()>

Source

fn post_bundles_delete(&self, location_ids: &[Id]) -> Result<()>

Source

fn post_bundles_last_accessed_iter( &self, location_id: &Id, ) -> Box<dyn Iterator<Item = Result<(Id, TimeMillisBytes), Error>> + '_>

Source

fn config_get_bytes(&self, key: &str) -> Result<Option<Vec<u8>>>

Source

fn config_put_bytes(&self, key: &str, v: Vec<u8>) -> Result<()>

Source

fn post_bundle_feedbacks_bytes_get( &self, post_bundle_location_id: &Id, ) -> Result<Bytes>

Get all the feedbacks for a given post_bundle_location_id

Returns a concatenated array of EncodedPostFeedbackV1 - may be []

Source

fn post_feedback_put_if_more_powerful( &self, location_id: &Id, encoded_post_feedback: &EncodedPostFeedbackV1, ) -> Result<()>

Stores the post feedback if it is more powerful than the current feedback

Provided Methods§

Source

fn config_get_usize(&self, key: &str) -> Result<Option<usize>>

Source

fn config_put_usize(&self, key: &str, v: usize) -> Result<()>

Implementors§