Struct idb_sys::StoreRequest

source ·
pub struct StoreRequest { /* private fields */ }
Expand description

Request returned when performing operations on an ObjectStore.

Trait Implementations§

source§

impl Debug for StoreRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<IdbRequest> for StoreRequest

source§

fn from(inner: IdbRequest) -> Self

Converts to this type from the input type.
source§

impl From<StoreRequest> for IdbRequest

source§

fn from(request: StoreRequest) -> Self

Converts to this type from the input type.
source§

impl From<StoreRequest> for JsValue

source§

fn from(value: StoreRequest) -> Self

Converts to this type from the input type.
source§

impl Request for StoreRequest

source§

fn result(&self) -> Result<JsValue, Error>

When a request is completed, returns the result, or undefined if the request failed. Returns an Error if the request is still pending.
source§

fn error(&self) -> Result<Option<DomException>, Error>

When a request is completed, returns the error (a DOMException), or None if the request succeeded. Returns an Error if the request is still pending.
source§

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.
source§

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.
source§

fn ready_state(&self) -> Result<RequestReadyState, Error>

Returns RequestReadyState::Pending until a request is complete, then returns RequestReadyState::Done.
source§

fn on_success<F>(&mut self, callback: F)
where F: FnOnce(Event) + 'static,

Adds an event handler for success event.
source§

fn on_error<F>(&mut self, callback: F)
where F: FnOnce(Event) + 'static,

Adds an event handler for error event.
source§

impl TryFrom<EventTarget> for StoreRequest

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(target: EventTarget) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<JsValue> for StoreRequest

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: JsValue) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.