pub struct ObjectStoreBuilder<'a, Err> { /* private fields */ }
Expand description
Helper to build an object store
Implementations§
Source§impl<'a, Err> ObjectStoreBuilder<'a, Err>
impl<'a, Err> ObjectStoreBuilder<'a, Err>
Sourcepub fn create(self) -> Result<ObjectStore<Err>, Err>
pub fn create(self) -> Result<ObjectStore<Err>, Err>
Create the object store
Internally, this uses IDBDatabase::createObjectStore
.
Sourcepub fn key_path(self, path: &str) -> Self
pub fn key_path(self, path: &str) -> Self
Set the key path for out-of-line keys
If you want to use a compound primary key made of multiple attributes, please see ObjectStoreBuilder::compound_key_path
.
Internally, this sets this setting.
Sourcepub fn compound_key_path(self, paths: &[&str]) -> Self
pub fn compound_key_path(self, paths: &[&str]) -> Self
Set the key path for out-of-line keys
Internally, this sets this setting.
Sourcepub fn auto_increment(self) -> Self
pub fn auto_increment(self) -> Self
Enable auto-increment for the key
Internally, this sets this setting.
Auto Trait Implementations§
impl<'a, Err> Freeze for ObjectStoreBuilder<'a, Err>
impl<'a, Err> RefUnwindSafe for ObjectStoreBuilder<'a, Err>where
Err: RefUnwindSafe,
impl<'a, Err> !Send for ObjectStoreBuilder<'a, Err>
impl<'a, Err> !Sync for ObjectStoreBuilder<'a, Err>
impl<'a, Err> Unpin for ObjectStoreBuilder<'a, Err>where
Err: Unpin,
impl<'a, Err> UnwindSafe for ObjectStoreBuilder<'a, Err>where
Err: UnwindSafe,
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