Skip to main content

Store

Struct Store 

Source
pub struct Store { /* private fields */ }
Expand description

FastEdge key-value persistent store resource

Implementations§

Source§

impl Store

Source

pub fn open(name: &str) -> Result<Store, Error>

Open the store with the specified name.

error::no-such-store will be raised if the name is not recognized.

Source§

impl Store

Source

pub fn get(&self, key: &str) -> Result<Option<Value>, Error>

Get the value associated with the specified key

Returns ok(none) if the key does not exist.

Source§

impl Store

Source

pub fn scan(&self, pattern: &str) -> Result<Vec<String>, Error>

Interface to scan over keys in the store. It matches glob-style pattern filter on each element from the retrieved collection.

Returns an array of elements as a list of keys.

Source§

impl Store

Source

pub fn zrange_by_score( &self, key: &str, min: f64, max: f64, ) -> Result<Vec<(Value, f64)>, Error>

Get all the elements with score from the sorted set at key with a f64 score between min and max (including elements with score equal to min or max). The elements are considered to be ordered from low to high scores.

Returns empty Vec if the key does not exist or if no elements have scores between min and max.

Source§

impl Store

Source

pub fn zscan( &self, key: &str, pattern: &str, ) -> Result<Vec<(Value, f64)>, Error>

Interface to scan through a sorted set by key It matches glob-style pattern filter on each elements from the retrieved collection.

Returns an array of elements as a list of value of the Sorted Set.

Source§

impl Store

Source

pub fn bf_exists(&self, key: &str, item: &str) -> Result<bool, Error>

Determines whether a given item was added to a Bloom filter.

Returns one of these replies: ‘true’ means that, with high probability, item was already added to the filter, and ‘false’ means that key does not exist or that item had not been added to the filter.

Trait Implementations§

Source§

impl Debug for Store

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Store

§

impl RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl UnsafeUnpin for Store

§

impl UnwindSafe for Store

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.