feat(napi): impl Clone + Copy for Primitive types
This commit is contained in:
parent
e24738a4d8
commit
c1215379f2
6 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@ use std::ptr;
|
|||
use super::*;
|
||||
use crate::{check_status, sys, Result};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsBigint {
|
||||
pub(crate) raw: Value,
|
||||
pub word_count: usize,
|
||||
|
|
|
@ -4,6 +4,7 @@ use super::Value;
|
|||
use crate::check_status;
|
||||
use crate::{sys, Error, Result};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsBoolean(pub(crate) Value);
|
||||
|
||||
impl JsBoolean {
|
||||
|
|
|
@ -61,8 +61,10 @@ pub use value_type::ValueType;
|
|||
|
||||
pub struct JsUnknown(pub(crate) Value);
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsNull(pub(crate) Value);
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsSymbol(pub(crate) Value);
|
||||
|
||||
pub struct JsExternal(pub(crate) Value);
|
||||
|
|
|
@ -4,6 +4,7 @@ use super::Value;
|
|||
use crate::check_status;
|
||||
use crate::{sys, Error, Result};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsNumber(pub(crate) Value);
|
||||
|
||||
impl JsNumber {
|
||||
|
|
|
@ -11,6 +11,7 @@ mod latin1;
|
|||
mod utf16;
|
||||
mod utf8;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsString(pub(crate) Value);
|
||||
|
||||
impl JsString {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use super::Value;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct JsUndefined(pub(crate) Value);
|
||||
|
|
Loading…
Reference in a new issue