[−][src]Struct actix_storage_dashmap::DashMapStore
A simple implementation of Store
based on DashMap
This provider doesn't support key expiration thus Storage will return errors when trying to use methods that require expiration functionality if there is no expiry provided.
Example
use actix_storage::Storage; use actix_storage_dashmap::DashMapStore; use actix_web::{App, HttpServer}; #[actix_web::main] async fn main() -> std::io::Result<()> { let storage = Storage::build().store(DashMapStore::new()).finish(); let server = HttpServer::new(move || { App::new() .data(storage.clone()) }); server.bind("localhost:5000")?.run().await }
Implementations
impl DashMapStore
[src]
pub fn new() -> Self
[src]
Make a new store, with default capacity of 0
pub fn with_capacity(capacity: usize) -> Self
[src]
Make a new store, with specified capacity
pub fn from_dashmap(map: DashMap<Arc<[u8]>, Arc<[u8]>>) -> Self
[src]
Make a new store from a hashmap
Trait Implementations
impl Debug for DashMapStore
[src]
impl Default for DashMapStore
[src]
fn default() -> DashMapStore
[src]
impl Store for DashMapStore
[src]
fn set<'life0, 'async_trait>(
&'life0 self,
key: Arc<[u8]>,
value: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: Arc<[u8]>,
value: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<[u8]>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<[u8]>>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn contains_key<'life0, 'async_trait>(
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: Arc<[u8]>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for DashMapStore
impl Send for DashMapStore
impl Sync for DashMapStore
impl Unpin for DashMapStore
impl UnwindSafe for DashMapStore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,