pub trait JsText<'a> {
// Required method
fn text(self) -> Cow<'a, str>;
}Expand description
The text of a JavaScript string value.
A well-formed value is borrowed. A value with a lone surrogate is owned, with
each lone surrogate written as \uXXXX (as JSStr::display does). Oxc 0.152
also stored a lone surrogate as escaped text (\u{FFFD}XXXX), so the text of
every well-formed value is the same as before.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".