pub trait IDBDatabaseMethods<D: DomTypes> {
Show 15 methods
// Required methods
fn Name(&self) -> DOMString;
fn Version(&self) -> u64;
fn ObjectStoreNames(&self, cx: &mut JSContext) -> DomRoot<D::DOMStringList>;
fn Transaction(
&self,
cx: &mut JSContext,
storeNames: StringOrStringSequence,
mode: IDBTransactionMode,
options: &IDBTransactionOptions,
) -> Fallible<DomRoot<D::IDBTransaction>>;
fn Close(&self);
fn CreateObjectStore(
&self,
cx: &mut JSContext,
name: DOMString,
options: &IDBObjectStoreParameters,
) -> Fallible<DomRoot<D::IDBObjectStore>>;
fn DeleteObjectStore(&self, name: DOMString) -> Fallible<()>;
fn GetOnabort(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnabort(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnclose(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnclose(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnerror(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnerror(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
fn GetOnversionchange(
&self,
cx: &mut JSContext,
) -> Option<RootedCallback<EventHandlerNonNull<D>>>;
fn SetOnversionchange(
&self,
cx: &mut JSContext,
value: Option<RootedCallback<EventHandlerNonNull<D>>>,
);
}Required Methods§
fn Name(&self) -> DOMString
fn Version(&self) -> u64
fn ObjectStoreNames(&self, cx: &mut JSContext) -> DomRoot<D::DOMStringList>
fn Transaction( &self, cx: &mut JSContext, storeNames: StringOrStringSequence, mode: IDBTransactionMode, options: &IDBTransactionOptions, ) -> Fallible<DomRoot<D::IDBTransaction>>
fn Close(&self)
fn CreateObjectStore( &self, cx: &mut JSContext, name: DOMString, options: &IDBObjectStoreParameters, ) -> Fallible<DomRoot<D::IDBObjectStore>>
fn DeleteObjectStore(&self, name: DOMString) -> Fallible<()>
fn GetOnabort( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnabort( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnclose( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnclose( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnerror( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnerror( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
fn GetOnversionchange( &self, cx: &mut JSContext, ) -> Option<RootedCallback<EventHandlerNonNull<D>>>
fn SetOnversionchange( &self, cx: &mut JSContext, value: Option<RootedCallback<EventHandlerNonNull<D>>>, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".