pub struct StdHost;Expand description
The native host.
Trait Implementations§
impl Copy for StdHost
Source§impl Host for StdHost
impl Host for StdHost
Source§fn zone_offset(&self, zone: &str, epoch_ms: i64) -> Option<i32>
fn zone_offset(&self, zone: &str, epoch_ms: i64) -> Option<i32>
The offset of zone (an IANA name, looked up case-insensitively, or
one of jiff’s special zones such as UTC) at epoch_ms, from the
bundled database; else, when zone is a POSIX TZ rule
(TimeZone::rules: a native application’s system zone without an
IANA name), from that rule. None for anything else, or an instant
outside jiff’s range (years −9999 to 9999).
Source§fn nfc<'a>(&self, s: &'a str, buf: &'a mut String) -> &'a str
fn nfc<'a>(&self, s: &'a str, buf: &'a mut String) -> &'a str
The NFC form of
s, which failed the quick check (it has a code point
at or above U+0300). buf is scratch the result may live in.Source§fn f64_to_text<'b>(&self, x: f64, buf: &'b mut [u8; 32]) -> Option<&'b str>
fn f64_to_text<'b>(&self, x: f64, buf: &'b mut [u8; 32]) -> Option<&'b str>
The shortest decimal text that round-trips the finite
x, written
into buf: any form number-literal accepts, with an optional + in
the exponent (ryu’s 4.2, 1e21, 1.5e-7 and JavaScript’s
String(x) both qualify). None if the host cannot produce it.Source§fn format_date_time(
&self,
locale: &str,
request: &DateTimeRequest<'_>,
out: &mut dyn Sink,
) -> bool
fn format_date_time( &self, locale: &str, request: &DateTimeRequest<'_>, out: &mut dyn Sink, ) -> bool
datetime-intl: writes request formatted by the host’s date
formatter (the browser’s Intl.DateTimeFormat) for locale, and
returns true; false (the default) when the host has none.Source§fn numbers(&self) -> Option<&dyn NumberFormatter>
fn numbers(&self) -> Option<&dyn NumberFormatter>
intl: the host’s number formatter (in the browser Intl.NumberFormat
and Intl.PluralRules, when the engine has Intl.NumberFormat v3);
None (the default) when it has none — the numeric functions of an
intl client then show exact digits and report Unsupported
Operation (plans/03-runtime.md §2.7).Auto Trait Implementations§
impl Freeze for StdHost
impl RefUnwindSafe for StdHost
impl Send for StdHost
impl Sync for StdHost
impl Unpin for StdHost
impl UnsafeUnpin for StdHost
impl UnwindSafe for StdHost
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