diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-11-03 14:43:21 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-11-03 14:43:21 +0100 |
| commit | 0cf59d78bda1669226f861e438d43a08b099d747 (patch) | |
| tree | 001d68cfa4aea673b73f69d2f95f549a675ac195 /src/data/pubsub.rs | |
| parent | 036a24614171eff0f99495b8b6f1c09e58cb4f9a (diff) | |
| download | rapier-0cf59d78bda1669226f861e438d43a08b099d747.tar.gz rapier-0cf59d78bda1669226f861e438d43a08b099d747.tar.bz2 rapier-0cf59d78bda1669226f861e438d43a08b099d747.zip | |
Implement Clone for everything that can be cloned.
Diffstat (limited to 'src/data/pubsub.rs')
| -rw-r--r-- | src/data/pubsub.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/data/pubsub.rs b/src/data/pubsub.rs index b2c9e27..80fb3a2 100644 --- a/src/data/pubsub.rs +++ b/src/data/pubsub.rs @@ -5,6 +5,7 @@ use std::marker::PhantomData; /// A permanent subscription to a pub-sub queue. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] +#[derive(Clone)] pub struct Subscription<T> { // Position on the cursor array. id: u32, @@ -12,6 +13,7 @@ pub struct Subscription<T> { } #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] +#[derive(Clone)] struct PubSubCursor { // Position on the offset array. id: u32, @@ -36,6 +38,7 @@ impl PubSubCursor { /// A pub-sub queue. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] +#[derive(Clone)] pub struct PubSub<T> { deleted_messages: u32, deleted_offsets: u32, |
