mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-22 08:38:27 +00:00
implement copy for Resource
This commit is contained in:
parent
a4de322821
commit
81e0469cc2
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,13 @@ pub struct Resource<T: 'static> {
|
|||
callback: UseCallback<Task>,
|
||||
}
|
||||
|
||||
impl<T> Clone for Resource<T> {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
impl<T> Copy for Resource<T> {}
|
||||
|
||||
/// A signal that represents the state of the resource
|
||||
// we might add more states (panicked, etc)
|
||||
#[derive(Clone, Copy, PartialEq, Hash, Eq, Debug)]
|
||||
|
|
Loading…
Add table
Reference in a new issue