feat(core): impl clone for Channel (#7174)

This commit is contained in:
Amr Bashir
2023-06-10 20:38:02 +03:00
committed by GitHub
parent 8124145d6c
commit b66e7d60f2
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
'tauri': 'patch'
---
Implement `Clone` for `Channel`

View File

@@ -26,6 +26,15 @@ pub struct Channel<R: Runtime> {
window: Window<R>,
}
impl<R: Runtime> Clone for Channel<R> {
fn clone(&self) -> Self {
Self {
id: self.id,
window: self.window.clone(),
}
}
}
impl Serialize for Channel {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where