pub struct ApiImport {
pub panic_message: PanicMessage,
pub fn_dom_access: fn(ptr: u32, size: u32) -> u32,
/* private fields */
}
Fields
panic_message: PanicMessage
fn_dom_access: fn(ptr: u32, size: u32) -> u32
Implementations
sourceimpl ApiImport
impl ApiImport
pub fn new(
panic_message: fn(ptr: u32, size: u32),
fn_dom_access: fn(ptr: u32, size: u32) -> u32
) -> ApiImport
pub fn show_panic_message(&self, message: String)
pub fn console_debug_4(&self, arg1: &str, arg2: &str, arg3: &str, arg4: &str)
pub fn console_log_4(&self, arg1: &str, arg2: &str, arg3: &str, arg4: &str)
pub fn console_info_4(&self, arg1: &str, arg2: &str, arg3: &str, arg4: &str)
pub fn console_warn_4(&self, arg1: &str, arg2: &str, arg3: &str, arg4: &str)
pub fn console_error_4(&self, arg1: &str, arg2: &str, arg3: &str, arg4: &str)
pub fn interval_set<F: Fn() + 'static>(
&self,
duration: u32,
callback: F
) -> DropResource
pub fn timeout_set<F: Fn() + 'static>(
&self,
duration: u32,
callback: F
) -> DropResource
pub fn set_timeout_and_detach<F: Fn() + 'static>(
&self,
duration: u32,
callback: F
)
pub fn instant_now(&self) -> InstantType
pub fn get_hash_location(&self) -> String
pub fn push_hash_location(&self, new_hash: &str)
pub fn on_hash_route_change<F: Fn(String) + 'static>(
&self,
callback: F
) -> DropResource
pub fn fetch(
&self,
method: FetchMethod,
url: String,
headers: Option<HashMap<String, String>>,
body: Option<String>
) -> Pin<Box<dyn Future<Output = FetchResult> + 'static>>
pub fn websocket<F: Fn(WebsocketMessage) + 'static>(
&self,
host: impl Into<String>,
callback: F
) -> DropResource
pub fn websocket_send_message(&self, callback_id: u64, message: &str)
pub fn dom_bulk_update(&self, value: &str)
pub fn dom_access(&self) -> DomAccess
pub fn get_random(&self, min: u32, max: u32) -> u32
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ApiImport
impl !Send for ApiImport
impl !Sync for ApiImport
impl Unpin for ApiImport
impl !UnwindSafe for ApiImport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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