pub struct WebScriptApi;
Implementations§
Source§impl WebScriptApi
impl WebScriptApi
pub fn start()
pub fn register_resource(name: &str, resource: JsValue)
pub fn register_state_factory(name: &str, factory: Function)
pub fn register_component_factory(name: &str, factory: Function)
pub fn register_system(name: &str, system: JsValue)
pub fn create_entity(data: JsValue) -> EntityId
pub fn destroy_entity(id: EntityId)
pub fn fetch(constrains: &Array) -> WebScriptFetch
Trait Implementations§
Source§impl Clone for WebScriptApi
impl Clone for WebScriptApi
Source§fn clone(&self) -> WebScriptApi
fn clone(&self) -> WebScriptApi
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WebScriptApi
impl Debug for WebScriptApi
Source§impl Default for WebScriptApi
impl Default for WebScriptApi
Source§fn default() -> WebScriptApi
fn default() -> WebScriptApi
Returns the “default value” for a type. Read more
Source§impl From<WebScriptApi> for JsValue
impl From<WebScriptApi> for JsValue
Source§fn from(value: WebScriptApi) -> Self
fn from(value: WebScriptApi) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WebScriptApi
impl FromWasmAbi for WebScriptApi
Source§impl IntoWasmAbi for WebScriptApi
impl IntoWasmAbi for WebScriptApi
Source§impl LongRefFromWasmAbi for WebScriptApi
impl LongRefFromWasmAbi for WebScriptApi
Source§impl OptionFromWasmAbi for WebScriptApi
impl OptionFromWasmAbi for WebScriptApi
Source§impl OptionIntoWasmAbi for WebScriptApi
impl OptionIntoWasmAbi for WebScriptApi
Source§impl RefFromWasmAbi for WebScriptApi
impl RefFromWasmAbi for WebScriptApi
Source§type Anchor = RcRef<WebScriptApi>
type Anchor = RcRef<WebScriptApi>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for WebScriptApi
impl RefMutFromWasmAbi for WebScriptApi
Source§impl TryFromJsValue for WebScriptApi
impl TryFromJsValue for WebScriptApi
Source§impl VectorFromWasmAbi for WebScriptApi
impl VectorFromWasmAbi for WebScriptApi
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WebScriptApi]>
Source§impl VectorIntoJsValue for WebScriptApi
impl VectorIntoJsValue for WebScriptApi
fn vector_into_jsvalue(vector: Box<[WebScriptApi]>) -> JsValue
Source§impl VectorIntoWasmAbi for WebScriptApi
impl VectorIntoWasmAbi for WebScriptApi
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WebScriptApi]>) -> Self::Abi
Source§impl WasmDescribeVector for WebScriptApi
impl WasmDescribeVector for WebScriptApi
impl Copy for WebScriptApi
impl SupportsConstructor for WebScriptApi
impl SupportsInstanceProperty for WebScriptApi
impl SupportsStaticProperty for WebScriptApi
Auto Trait Implementations§
impl Freeze for WebScriptApi
impl RefUnwindSafe for WebScriptApi
impl Send for WebScriptApi
impl Sync for WebScriptApi
impl Unpin for WebScriptApi
impl UnwindSafe for WebScriptApi
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.Source§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
Source§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
Source§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.