pub struct ApiImport {
pub panic_message: PanicMessage,
pub fn_dom_access: fn(ptr: u32, size: u32) -> u32,
pub on_fetch_start: EventEmitter<()>,
pub on_fetch_stop: EventEmitter<()>,
/* private fields */
}
Fields§
§panic_message: PanicMessage
§fn_dom_access: fn(ptr: u32, size: u32) -> u32
§on_fetch_start: EventEmitter<()>
§on_fetch_stop: EventEmitter<()>
Implementations§
source§impl ApiImport
impl 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 history_back(&self)
pub fn get_hash_location(&self) -> String
pub fn push_hash_location(&self, new_hash: &str)
pub fn on_hash_change<F: Fn(String) + 'static>( &self, callback: F ) -> DropResource
pub fn get_history_location(&self) -> String
pub fn push_history_location(&self, new_hash: &str)
pub fn on_history_change<F: Fn(String) + 'static>( &self, callback: F ) -> DropResource
pub fn fetch( &self, method: FetchMethod, url: String, headers: Option<HashMap<String, String>>, body: Option<RequestBody> ) -> 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: JsJson)
pub fn dom_access(&self) -> DomAccess
pub fn get_random(&self, min: u32, max: u32) -> u32
pub fn is_browser(&self) -> bool
pub fn get_env(&self, name: String) -> Option<String>
sourcepub fn plain_response(&self, body: String)
pub fn plain_response(&self, body: String)
Synthetic command to respond with plain text, not DOM
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiImport
impl !RefUnwindSafe for ApiImport
impl !Send for ApiImport
impl !Sync for ApiImport
impl Unpin for ApiImport
impl !UnwindSafe for ApiImport
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