pub struct WebScriptInterface { /* private fields */ }
Implementations§
Source§impl WebScriptInterface
impl WebScriptInterface
pub fn is_ready() -> bool
pub fn is_invalid() -> bool
pub fn register_scriptable_resource<S>(&mut self, name: &str, resource: S)where
S: 'static + Scriptable,
pub fn register_resource_bridge<'a, S, M>(&mut self, name: &str)
pub fn register_scriptable_component<S>(&mut self, name: &str, component: S)where
S: 'static + Scriptable,
pub fn register_component_bridge<S, M>(&mut self, name: &str, template: S)where
S: Scriptable + Component + Clone + Send + Sync + ComponentModify<M>,
S::Storage: Default,
M: Scriptable + From<S>,
pub fn register_scriptable_state_factory<S>(&mut self, name: &str, factory: S)
pub fn read_scriptable_resource<T>(name: &str) -> Option<T>where
T: Scriptable,
pub fn read_js_resource(name: &str) -> Option<ScriptableValue>
pub fn write_scriptable_resource<T>(name: &str, value: &T)where
T: Scriptable,
pub fn write_js_resource(name: &str, value: &ScriptableValue)
Trait Implementations§
Source§impl Default for WebScriptInterface
impl Default for WebScriptInterface
impl Send for WebScriptInterface
impl Sync for WebScriptInterface
Auto Trait Implementations§
impl Freeze for WebScriptInterface
impl !RefUnwindSafe for WebScriptInterface
impl Unpin for WebScriptInterface
impl !UnwindSafe for WebScriptInterface
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> 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.