Struct idb_sys::DatabaseRequest
source · [−]pub struct DatabaseRequest { /* private fields */ }Expand description
Request returned by Factory when opening or deleting a database.
Implementations
sourceimpl DatabaseRequest
impl DatabaseRequest
sourcepub fn database(&self) -> Result<Database, Error>
pub fn database(&self) -> Result<Database, Error>
Returns the database associated with this request
sourcepub fn on_blocked<F>(&mut self, callback: F) where
F: FnOnce(VersionChangeEvent) + 'static,
pub fn on_blocked<F>(&mut self, callback: F) where
F: FnOnce(VersionChangeEvent) + 'static,
Adds an event handler for blocked event.
sourcepub fn on_upgrade_needed<F>(&mut self, callback: F) where
F: FnOnce(VersionChangeEvent) + 'static,
pub fn on_upgrade_needed<F>(&mut self, callback: F) where
F: FnOnce(VersionChangeEvent) + 'static,
Adds an event handler for upgradeneeded event.
Trait Implementations
sourceimpl Debug for DatabaseRequest
impl Debug for DatabaseRequest
sourceimpl From<DatabaseRequest> for IdbOpenDbRequest
impl From<DatabaseRequest> for IdbOpenDbRequest
sourcefn from(request: DatabaseRequest) -> Self
fn from(request: DatabaseRequest) -> Self
Converts to this type from the input type.
sourceimpl From<DatabaseRequest> for JsValue
impl From<DatabaseRequest> for JsValue
sourcefn from(value: DatabaseRequest) -> Self
fn from(value: DatabaseRequest) -> Self
Converts to this type from the input type.
sourceimpl From<IdbOpenDbRequest> for DatabaseRequest
impl From<IdbOpenDbRequest> for DatabaseRequest
sourcefn from(inner: IdbOpenDbRequest) -> Self
fn from(inner: IdbOpenDbRequest) -> Self
Converts to this type from the input type.
sourceimpl Request for DatabaseRequest
impl Request for DatabaseRequest
sourcefn source(&self) -> Result<Object, Error>
fn source(&self) -> Result<Object, Error>
Returns the ObjectStore, Index, or Cursor the request was made against, or null if it was an open
request. Read more
sourcefn transaction(&self) -> Option<Transaction>
fn transaction(&self) -> Option<Transaction>
Returns the Transaction the request was made within. If this as an open request, then it returns an upgrade
transaction while it is running, or None otherwise. Read more
sourcefn ready_state(&self) -> Result<RequestReadyState, Error>
fn ready_state(&self) -> Result<RequestReadyState, Error>
Returns RequestReadyState::Pending until a request is complete, then returns RequestReadyState::Done.
sourcefn on_success<F>(&mut self, callback: F) where
F: FnOnce(Event) + 'static,
fn on_success<F>(&mut self, callback: F) where
F: FnOnce(Event) + 'static,
Adds an event handler for success event.
sourceimpl TryFrom<EventTarget> for DatabaseRequest
impl TryFrom<EventTarget> for DatabaseRequest
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseRequest
impl !Send for DatabaseRequest
impl !Sync for DatabaseRequest
impl Unpin for DatabaseRequest
impl !UnwindSafe for DatabaseRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more