pub struct SharedJsStr { /* private fields */ }Expand description
Immutable Latin1 or UTF-16 string stored in an Arc.
Cloning bumps the atomic reference count and does not copy the code units.
JsString::from_shared materializes a JsString that shares the allocation.
Send SharedJsStr across threads, then call from_shared on the thread that
will use the JsString. JsString itself is not thread-safe.
Implementations§
Trait Implementations§
Source§fn from(shared: SharedJsStr) -> Self
fn from(shared: SharedJsStr) -> Self
Converts to this type from the input type.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
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