pub struct PostgresStorage { /* private fields */ }Expand description
A PostgreSQL-backed storage adapter for samod.
§Database Schema
The adapter requires a table with the following structure:
CREATE TABLE storage (
key text[] PRIMARY KEY,
data bytea NOT NULL
);Implementations§
Trait Implementations§
Source§impl Clone for PostgresStorage
impl Clone for PostgresStorage
Source§fn clone(&self) -> PostgresStorage
fn clone(&self) -> PostgresStorage
Returns a duplicate 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 Storage for PostgresStorage
impl Storage for PostgresStorage
Auto Trait Implementations§
impl Freeze for PostgresStorage
impl !RefUnwindSafe for PostgresStorage
impl Send for PostgresStorage
impl Sync for PostgresStorage
impl Unpin for PostgresStorage
impl !UnwindSafe for PostgresStorage
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,
§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<S> LocalStorage for Swhere
S: Storage,
impl<S> LocalStorage for Swhere
S: Storage,
§fn load(&self, key: StorageKey) -> impl Future<Output = Option<Vec<u8>>>
fn load(&self, key: StorageKey) -> impl Future<Output = Option<Vec<u8>>>
Load a specific key from storage
§fn load_range(
&self,
prefix: StorageKey,
) -> impl Future<Output = HashMap<StorageKey, Vec<u8>>>
fn load_range( &self, prefix: StorageKey, ) -> impl Future<Output = HashMap<StorageKey, Vec<u8>>>
Load a range of keys from storage, all of which begin with
prefix Read more