Struct indexed_db::ObjectStoreConfigurator
source · pub struct ObjectStoreConfigurator { /* private fields */ }
Expand description
Wrapper for IDBObjectStore
,
specialized for configuring object stores
Implementations§
source§impl ObjectStoreConfigurator
impl ObjectStoreConfigurator
sourcepub fn build_index<'a>(
&self,
name: &'a str,
key_path: &[&str]
) -> IndexBuilder<'a>
pub fn build_index<'a>( &self, name: &'a str, key_path: &[&str] ) -> IndexBuilder<'a>
Build an index over this object store
Note that this method can only be called from within an on_upgrade_needed
callback. It returns
a builder, and calling the create
method on this builder will perform the actual creation.
Internally, this uses IDBObjectStore::createIndex
.
sourcepub fn delete_index(&self, name: &str) -> Result<()>
pub fn delete_index(&self, name: &str) -> Result<()>
Delete an index from this object store
Note that this method can only be called from within an on_upgrade_needed
callback. It returns
a builder, and calling the create
method on this builder will perform the actual creation.
Internally, this uses IDBObjectStore::deleteIndex
.
Auto Trait Implementations§
impl RefUnwindSafe for ObjectStoreConfigurator
impl !Send for ObjectStoreConfigurator
impl !Sync for ObjectStoreConfigurator
impl Unpin for ObjectStoreConfigurator
impl UnwindSafe for ObjectStoreConfigurator
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