pub struct IndexedDB { /* private fields */ }Expand description
Client for a running IndexedDB provider.
Implementations§
Source§impl IndexedDB
impl IndexedDB
Sourcepub async fn connect() -> Result<Self, IndexedDBError>
pub async fn connect() -> Result<Self, IndexedDBError>
Connects to the default IndexedDB transport socket.
Sourcepub async fn connect_named(name: &str) -> Result<Self, IndexedDBError>
pub async fn connect_named(name: &str) -> Result<Self, IndexedDBError>
Connects to a named IndexedDB transport socket.
Sourcepub async fn create_object_store(
&mut self,
name: &str,
schema: ObjectStoreSchema,
) -> Result<ObjectStore, IndexedDBError>
pub async fn create_object_store( &mut self, name: &str, schema: ObjectStoreSchema, ) -> Result<ObjectStore, IndexedDBError>
Creates a named object store.
Sourcepub async fn delete_object_store(
&mut self,
name: &str,
) -> Result<(), IndexedDBError>
pub async fn delete_object_store( &mut self, name: &str, ) -> Result<(), IndexedDBError>
Deletes a named object store.
Sourcepub fn object_store(&self, name: &str) -> ObjectStore
pub fn object_store(&self, name: &str) -> ObjectStore
Returns a typed handle for one object store.
Sourcepub async fn transaction(
&self,
stores: &[&str],
mode: TransactionMode,
options: TransactionOptions,
) -> Result<Transaction, IndexedDBError>
pub async fn transaction( &self, stores: &[&str], mode: TransactionMode, options: TransactionOptions, ) -> Result<Transaction, IndexedDBError>
Opens an explicit transaction over a fixed object-store scope.
Trait Implementations§
Source§impl IndexedDBApi for IndexedDB
impl IndexedDBApi for IndexedDB
Source§type ObjectStore = ObjectStore
type ObjectStore = ObjectStore
The store handle this scope yields.
Source§type Transaction = Transaction
type Transaction = Transaction
The transaction handle this database yields.
Source§fn create_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
schema: ObjectStoreSchema,
) -> Pin<Box<dyn Future<Output = Result<ObjectStore, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
schema: ObjectStoreSchema,
) -> Pin<Box<dyn Future<Output = Result<ObjectStore, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a named object store and returns a typed handle for it.
Source§fn delete_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_object_store<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a named object store.
Source§fn object_store(&self, name: &str) -> ObjectStore
fn object_store(&self, name: &str) -> ObjectStore
Returns a typed handle for one object store.
Source§fn transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stores: &'life1 [&'life2 str],
mode: TransactionMode,
options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = Result<Transaction, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stores: &'life1 [&'life2 str],
mode: TransactionMode,
options: TransactionOptions,
) -> Pin<Box<dyn Future<Output = Result<Transaction, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Opens an explicit transaction over a fixed object-store scope.
Auto Trait Implementations§
impl !Freeze for IndexedDB
impl !RefUnwindSafe for IndexedDB
impl !UnwindSafe for IndexedDB
impl Send for IndexedDB
impl Sync for IndexedDB
impl Unpin for IndexedDB
impl UnsafeUnpin for IndexedDB
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request