add uniffi compression code, clone
add uniffi clone
This commit is contained in:
parent
18f1ccb2dc
commit
03aa432655
7 changed files with 213 additions and 40 deletions
|
@ -33,6 +33,11 @@ impl BrightnessGrid {
|
|||
))
|
||||
}
|
||||
|
||||
#[uniffi::constructor]
|
||||
pub fn clone(other: &Arc<Self>) -> Arc<Self> {
|
||||
Self::internal_new(other.actual.read().unwrap().clone())
|
||||
}
|
||||
|
||||
pub fn set(&self, x: u64, y: u64, value: u8) {
|
||||
self.actual.write().unwrap().set(
|
||||
x as usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue