pub struct JsiValue { /* private fields */ }Implementations§
Source§impl JsiValue
impl JsiValue
pub fn is_undefined(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_symbol(&self) -> bool
pub fn is_object(&self) -> bool
pub fn get_bool(&self) -> Result<bool, Exception>
pub fn get_number(&self) -> Result<f64, Exception>
Source§impl JsiValue
impl JsiValue
pub fn undefined() -> UniquePtr<Self>
pub fn null() -> UniquePtr<Self>
pub fn int(i: i32) -> UniquePtr<Self>
pub fn bool(b: bool) -> UniquePtr<Self>
pub fn double(d: f64) -> UniquePtr<Self>
pub fn object(rt: Pin<&mut Runtime>, o: &JsiObject) -> UniquePtr<Self>
pub fn symbol(rt: Pin<&mut Runtime>, s: &JsiSymbol) -> UniquePtr<Self>
pub fn string(rt: Pin<&mut Runtime>, s: &JsiString) -> UniquePtr<Self>
pub fn from_json(rt: Pin<&mut Runtime>, json: &str) -> UniquePtr<Self>
pub fn as_object( &self, rt: Pin<&mut Runtime>, ) -> Result<UniquePtr<JsiObject>, Exception>
pub fn as_symbol( &self, rt: Pin<&mut Runtime>, ) -> Result<UniquePtr<JsiSymbol>, Exception>
pub fn as_string( &self, rt: Pin<&mut Runtime>, ) -> Result<UniquePtr<JsiString>, Exception>
pub fn to_string(&self, rt: Pin<&mut Runtime>) -> UniquePtr<JsiString>
Trait Implementations§
Source§impl ExternType for JsiValue
impl ExternType for JsiValue
impl UniquePtrTarget for JsiValue
impl VectorElement for JsiValue
Auto Trait Implementations§
impl !Freeze for JsiValue
impl RefUnwindSafe for JsiValue
impl !Send for JsiValue
impl !Sync for JsiValue
impl !Unpin for JsiValue
impl UnwindSafe for JsiValue
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