Ensure custom JavaScript classes are cloneable

This commit is contained in:
Tobie Morgan Hitchcock 2023-02-13 16:03:29 +00:00
parent efbc5d3219
commit 1fb147eb5e
3 changed files with 3 additions and 0 deletions

View file

@ -10,6 +10,7 @@ pub mod duration {
#[derive(Clone)] #[derive(Clone)]
#[quickjs(class)] #[quickjs(class)]
#[quickjs(cloneable)]
pub struct Duration { pub struct Duration {
#[quickjs(hide)] #[quickjs(hide)]
pub(crate) value: String, pub(crate) value: String,

View file

@ -10,6 +10,7 @@ pub mod record {
#[derive(Clone)] #[derive(Clone)]
#[quickjs(class)] #[quickjs(class)]
#[quickjs(cloneable)]
pub struct Record { pub struct Record {
#[quickjs(hide)] #[quickjs(hide)]
pub(crate) tb: String, pub(crate) tb: String,

View file

@ -10,6 +10,7 @@ pub mod uuid {
#[derive(Clone)] #[derive(Clone)]
#[quickjs(class)] #[quickjs(class)]
#[quickjs(cloneable)]
pub struct Uuid { pub struct Uuid {
#[quickjs(hide)] #[quickjs(hide)]
pub(crate) value: String, pub(crate) value: String,