pub struct SystemHost;Expand description
A default host over the process: its streams, the system clock, UTC. The default host: the process’s streams, the system clock, UTC.
Trait Implementations§
Source§impl Debug for SystemHost
impl Debug for SystemHost
Source§impl Default for SystemHost
impl Default for SystemHost
Source§fn default() -> SystemHost
fn default() -> SystemHost
Returns the “default value” for a type. Read more
Source§impl Host for SystemHost
impl Host for SystemHost
Source§fn write(&mut self, stream: Stream, text: &[u8])
fn write(&mut self, stream: Stream, text: &[u8])
Writes host output (
print): UTF-8, with a lone surrogate of the
JavaScript string encoded as is (WTF-8), as QuickJS’s
JS_ToCStringLen writes it. The default writes to the process’s
streams.Source§fn local_tz_offset_minutes(&mut self, _utc_ms: f64) -> i32
fn local_tz_offset_minutes(&mut self, _utc_ms: f64) -> i32
UTC minus local time, in minutes, at
utc_ms
(Date.prototype.getTimezoneOffset’s sign). The default is UTC.Source§fn random_seed(&mut self) -> u64
fn random_seed(&mut self) -> u64
The initial state of
Math.random. The default derives it from the
system clock, as QuickJS seeds from host time.Source§fn promise_rejection(&mut self, event: RejectionEvent, promise: Value)
fn promise_rejection(&mut self, event: RejectionEvent, promise: Value)
HostPromiseRejectionTracker(promise, operation). The promise is a
value of the runtime; while rejection tracking is on
(Runtime::set_track_rejections)
the runtime also keeps every unhandled rejected promise alive in
Runtime::unhandled_rejections.
The default ignores the event.Auto Trait Implementations§
impl Freeze for SystemHost
impl RefUnwindSafe for SystemHost
impl Send for SystemHost
impl Sync for SystemHost
impl Unpin for SystemHost
impl UnsafeUnpin for SystemHost
impl UnwindSafe for SystemHost
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