File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ pub mod line;
99pub mod operations;
1010pub mod storage_adapter;
1111mod streaming_sync;
12+ mod subscriptions;
1213mod sync_status;
1314
1415pub use bucket_priority:: BucketPriority ;
Original file line number Diff line number Diff line change 1+ use core:: time:: Duration ;
2+
3+ use alloc:: string:: String ;
4+ use serde:: Deserialize ;
5+ use serde_with:: { serde_as, DurationSeconds } ;
6+
7+ use crate :: sync:: BucketPriority ;
8+
9+ /// A request sent from a PowerSync SDK to alter the subscriptions managed by this client.
10+ #[ derive( Deserialize ) ]
11+ pub enum SubscriptionChangeRequest {
12+ Subscribe ( SubscribeToStream ) ,
13+ }
14+
15+ #[ serde_as]
16+ #[ derive( Deserialize ) ]
17+ pub struct SubscribeToStream {
18+ pub stream : String ,
19+ pub params : Option < serde_json:: value:: RawValue > ,
20+ #[ serde_as( as = "Option<DurationSeconds>" ) ]
21+ pub ttl : Option < Duration > ,
22+ pub priority : Option < BucketPriority > ,
23+ }
24+
25+ #[ derive( Deserialize ) ]
26+ pub struct UnsubscribeFromStream {
27+ pub stream : String ,
28+ pub params : Option < serde_json:: value:: RawValue > ,
29+ pub immediate : bool ,
30+ }
You can’t perform that action at this time.
0 commit comments