pub struct JSString { /* private fields */ }
Expand description
Wrapper around String
that ensures it contains syntactically valid Javascript.
See docs for JSStr
for more info.
Implementations§
Source§impl JSString
impl JSString
pub fn new(code: String) -> Result<Self, JSParseError>
pub unsafe fn new_unchecked(code: String) -> Self
pub fn into_string(self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JSString
impl RefUnwindSafe for JSString
impl Send for JSString
impl Sync for JSString
impl Unpin for JSString
impl UnwindSafe for JSString
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