pub struct JsString(/* private fields */);
Implementations§
Source§impl JsString
impl JsString
pub fn utf8_len(&self) -> Result<usize>
pub fn utf16_len(&self) -> Result<usize>
pub fn latin1_len(&self) -> Result<usize>
pub fn into_utf8(self) -> Result<JsStringUtf8>
pub fn into_utf16(self) -> Result<JsStringUtf16>
pub fn into_latin1(self) -> Result<JsStringLatin1>
Source§impl JsString
impl JsString
pub fn into_unknown(self) -> JsUnknown
pub fn coerce_to_number(self) -> Result<JsNumber>
pub fn coerce_to_string(self) -> Result<JsString>
pub fn coerce_to_object(self) -> Result<JsObject>
pub fn is_date(&self) -> Result<bool>
pub fn is_promise(&self) -> Result<bool>
pub fn is_error(&self) -> Result<bool>
pub fn is_typedarray(&self) -> Result<bool>
pub fn is_dataview(&self) -> Result<bool>
pub fn is_array(&self) -> Result<bool>
pub fn is_buffer(&self) -> Result<bool>
pub fn instanceof<Constructor>(&self, constructor: Constructor) -> Result<bool>where
Constructor: NapiRaw,
pub fn freeze(&mut self) -> Result<()>
pub fn seal(&mut self) -> Result<()>
Trait Implementations§
Source§impl NapiValue for JsString
impl NapiValue for JsString
unsafe fn from_raw(env: napi_env, value: napi_value) -> Result<JsString>
unsafe fn from_raw_unchecked(env: napi_env, value: napi_value) -> JsString
impl Copy for JsString
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