pub struct ReturnValue<'cb, T = Value>(/* private fields */);
Implementations§
Source§impl<'cb, T> ReturnValue<'cb, T>
impl<'cb, T> ReturnValue<'cb, T>
pub fn from_property_callback_info(info: &'cb PropertyCallbackInfo<T>) -> Self
Source§impl<'cb> ReturnValue<'cb, Value>
impl<'cb> ReturnValue<'cb, Value>
pub fn from_function_callback_info(info: &'cb FunctionCallbackInfo) -> Self
Source§impl<T> ReturnValue<'_, T>
impl<T> ReturnValue<'_, T>
pub fn set(&mut self, value: Local<'_, T>)
pub fn set_bool(&mut self, value: bool)
pub fn set_int32(&mut self, value: i32)
pub fn set_uint32(&mut self, value: u32)
pub fn set_double(&mut self, value: f64)
pub fn set_null(&mut self)
pub fn set_undefined(&mut self)
pub fn set_empty_string(&mut self)
Sourcepub fn get<'s>(&self, scope: &mut HandleScope<'s>) -> Local<'s, Value>
pub fn get<'s>(&self, scope: &mut HandleScope<'s>) -> Local<'s, Value>
Getter. Creates a new Local<> so it comes with a certain performance hit. If the ReturnValue was not yet set, this will return the undefined value.
Trait Implementations§
Auto Trait Implementations§
impl<'cb, T> Freeze for ReturnValue<'cb, T>
impl<'cb, T> RefUnwindSafe for ReturnValue<'cb, T>where
T: RefUnwindSafe,
impl<'cb, T> Send for ReturnValue<'cb, T>where
T: Sync,
impl<'cb, T> Sync for ReturnValue<'cb, T>where
T: Sync,
impl<'cb, T> Unpin for ReturnValue<'cb, T>
impl<'cb, T> UnwindSafe for ReturnValue<'cb, T>where
T: RefUnwindSafe,
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