pub struct ValueView<'s>(/* private fields */);Expand description
Returns a view onto a string’s contents.
WARNING: This does not copy the string’s contents, and will therefore be invalidated if the GC can move the string while the ValueView is alive. It is therefore required that no GC or allocation can happen while there is an active ValueView. This requirement may be relaxed in the future.
V8 strings are either encoded as one-byte or two-bytes per character.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'s> Freeze for ValueView<'s>
impl<'s> RefUnwindSafe for ValueView<'s>
impl<'s> Send for ValueView<'s>
impl<'s> Sync for ValueView<'s>
impl<'s> Unpin for ValueView<'s>
impl<'s> UnwindSafe for ValueView<'s>
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