magic_sync 0.1.1

Keeps partial copies of PostgreSQL tables on SQLite replicas — offline-first, by comparing what each replica holds with what it should hold
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
pub mod magic_sync
pub use magic_sync::Columns
pub use magic_sync::Row
pub mod magic_sync::envelope
pub struct magic_sync::envelope::Limits
impl magic_sync::envelope::Limits
pub fn magic_sync::envelope::Limits::bytes(&self) -> usize
pub fn magic_sync::envelope::Limits::new(usize, usize) -> core::result::Result<Self, magic_sync::Error>
pub fn magic_sync::envelope::Limits::rows(&self) -> usize
impl core::clone::Clone for magic_sync::envelope::Limits
pub fn magic_sync::envelope::Limits::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::envelope::Limits
impl core::cmp::PartialEq for magic_sync::envelope::Limits
pub fn magic_sync::envelope::Limits::eq(&self, &Self) -> bool
impl core::default::Default for magic_sync::envelope::Limits
pub fn magic_sync::envelope::Limits::default() -> Self
impl core::fmt::Debug for magic_sync::envelope::Limits
pub fn magic_sync::envelope::Limits::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::envelope::Limits
impl core::marker::StructuralPartialEq for magic_sync::envelope::Limits
impl core::marker::Freeze for magic_sync::envelope::Limits
impl core::marker::Send for magic_sync::envelope::Limits
impl core::marker::Sync for magic_sync::envelope::Limits
impl core::marker::Unpin for magic_sync::envelope::Limits
impl core::marker::UnsafeUnpin for magic_sync::envelope::Limits
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::envelope::Limits
impl core::panic::unwind_safe::UnwindSafe for magic_sync::envelope::Limits
pub const magic_sync::envelope::ENVELOPE_ROOM: usize
pub const magic_sync::envelope::PROTOCOL: u32
pub mod magic_sync::replica
#[non_exhaustive] pub enum magic_sync::replica::Received
pub magic_sync::replica::Received::AlreadyApplied
pub magic_sync::replica::Received::Applied(alloc::vec::Vec<magic_sync::replica::Applied>)
pub magic_sync::replica::Received::Filed
pub magic_sync::replica::Received::Gap
pub magic_sync::replica::Received::Malformed(alloc::string::String)
pub magic_sync::replica::Received::SnapshotEnded
impl core::fmt::Debug for magic_sync::replica::Received
pub fn magic_sync::replica::Received::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::replica::Received
impl core::marker::Send for magic_sync::replica::Received
impl core::marker::Sync for magic_sync::replica::Received
impl core::marker::Unpin for magic_sync::replica::Received
impl core::marker::UnsafeUnpin for magic_sync::replica::Received
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::replica::Received
impl core::panic::unwind_safe::UnwindSafe for magic_sync::replica::Received
#[non_exhaustive] pub struct magic_sync::replica::Applied
pub magic_sync::replica::Applied::keys: alloc::vec::Vec<magic_sync::row::Key>
pub magic_sync::replica::Applied::table: alloc::string::String
impl core::clone::Clone for magic_sync::replica::Applied
pub fn magic_sync::replica::Applied::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::replica::Applied
impl core::cmp::PartialEq for magic_sync::replica::Applied
pub fn magic_sync::replica::Applied::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::replica::Applied
pub fn magic_sync::replica::Applied::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::StructuralPartialEq for magic_sync::replica::Applied
impl core::marker::Freeze for magic_sync::replica::Applied
impl core::marker::Send for magic_sync::replica::Applied
impl core::marker::Sync for magic_sync::replica::Applied
impl core::marker::Unpin for magic_sync::replica::Applied
impl core::marker::UnsafeUnpin for magic_sync::replica::Applied
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::replica::Applied
impl core::panic::unwind_safe::UnwindSafe for magic_sync::replica::Applied
#[non_exhaustive] pub struct magic_sync::replica::Lane
pub magic_sync::replica::Lane::name: &'static str
pub magic_sync::replica::Lane::tables: &'static [&'static str]
impl magic_sync::replica::Lane
pub const fn magic_sync::replica::Lane::new(&'static str, &'static [&'static str]) -> Self
impl core::clone::Clone for magic_sync::replica::Lane
pub fn magic_sync::replica::Lane::clone(&self) -> Self
impl core::fmt::Debug for magic_sync::replica::Lane
pub fn magic_sync::replica::Lane::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::replica::Lane
impl core::marker::Send for magic_sync::replica::Lane
impl core::marker::Sync for magic_sync::replica::Lane
impl core::marker::Unpin for magic_sync::replica::Lane
impl core::marker::UnsafeUnpin for magic_sync::replica::Lane
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::replica::Lane
impl core::panic::unwind_safe::UnwindSafe for magic_sync::replica::Lane
#[non_exhaustive] pub struct magic_sync::replica::Outbox
pub magic_sync::replica::Outbox::backlog_every: core::time::Duration
pub magic_sync::replica::Outbox::limits: magic_sync::envelope::Limits
pub magic_sync::replica::Outbox::resend_after: core::time::Duration
impl core::clone::Clone for magic_sync::replica::Outbox
pub fn magic_sync::replica::Outbox::clone(&self) -> Self
impl core::default::Default for magic_sync::replica::Outbox
pub fn magic_sync::replica::Outbox::default() -> Self
impl core::fmt::Debug for magic_sync::replica::Outbox
pub fn magic_sync::replica::Outbox::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::replica::Outbox
impl core::marker::Send for magic_sync::replica::Outbox
impl core::marker::Sync for magic_sync::replica::Outbox
impl core::marker::Unpin for magic_sync::replica::Outbox
impl core::marker::UnsafeUnpin for magic_sync::replica::Outbox
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::replica::Outbox
impl core::panic::unwind_safe::UnwindSafe for magic_sync::replica::Outbox
#[non_exhaustive] pub struct magic_sync::replica::UpProgress
pub magic_sync::replica::UpProgress::set_aside: i64
pub magic_sync::replica::UpProgress::table: alloc::string::String
pub magic_sync::replica::UpProgress::unfiled: i64
pub magic_sync::replica::UpProgress::unsent: i64
impl core::clone::Clone for magic_sync::replica::UpProgress
pub fn magic_sync::replica::UpProgress::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::replica::UpProgress
impl core::cmp::PartialEq for magic_sync::replica::UpProgress
pub fn magic_sync::replica::UpProgress::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::replica::UpProgress
pub fn magic_sync::replica::UpProgress::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::StructuralPartialEq for magic_sync::replica::UpProgress
impl serde_core::ser::Serialize for magic_sync::replica::UpProgress
pub fn magic_sync::replica::UpProgress::serialize<__S>(&self, __S) -> core::result::Result<<__S as serde_core::ser::Serializer>::Ok, <__S as serde_core::ser::Serializer>::Error> where __S: serde_core::ser::Serializer
impl<'de> serde_core::de::Deserialize<'de> for magic_sync::replica::UpProgress
pub fn magic_sync::replica::UpProgress::deserialize<__D>(__D) -> core::result::Result<Self, <__D as serde_core::de::Deserializer>::Error> where __D: serde_core::de::Deserializer<'de>
impl core::marker::Freeze for magic_sync::replica::UpProgress
impl core::marker::Send for magic_sync::replica::UpProgress
impl core::marker::Sync for magic_sync::replica::UpProgress
impl core::marker::Unpin for magic_sync::replica::UpProgress
impl core::marker::UnsafeUnpin for magic_sync::replica::UpProgress
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::replica::UpProgress
impl core::panic::unwind_safe::UnwindSafe for magic_sync::replica::UpProgress
pub async fn magic_sync::replica::check<P: core::marker::Sync + 'static>(&mut magic_sync::Conn, &[magic_sync::wire::Codec<P>]) -> core::result::Result<(), magic_sync::Error>
pub async fn magic_sync::replica::install<P: core::marker::Sync + 'static>(&mut magic_sync::Conn, &[magic_sync::wire::Codec<P>]) -> core::result::Result<(), magic_sync::Error>
pub fn magic_sync::replica::migration(i32) -> core::option::Option<alloc::string::String>
pub async fn magic_sync::replica::progress(&mut magic_sync::Conn) -> core::result::Result<alloc::vec::Vec<magic_sync::replica::UpProgress>, magic_sync::Error>
pub fn magic_sync::replica::triggers<P: core::marker::Sync + 'static>(&[magic_sync::wire::Codec<P>]) -> core::result::Result<alloc::string::String, magic_sync::Error>
pub mod magic_sync::row
#[non_exhaustive] pub enum magic_sync::row::Apply
pub magic_sync::row::Apply::Always
pub magic_sync::row::Apply::IfUnchanged
impl core::clone::Clone for magic_sync::row::Apply
pub fn magic_sync::row::Apply::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::row::Apply
impl core::cmp::PartialEq for magic_sync::row::Apply
pub fn magic_sync::row::Apply::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::row::Apply
pub fn magic_sync::row::Apply::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::row::Apply
impl core::marker::StructuralPartialEq for magic_sync::row::Apply
impl core::marker::Freeze for magic_sync::row::Apply
impl core::marker::Send for magic_sync::row::Apply
impl core::marker::Sync for magic_sync::row::Apply
impl core::marker::Unpin for magic_sync::row::Apply
impl core::marker::UnsafeUnpin for magic_sync::row::Apply
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::row::Apply
impl core::panic::unwind_safe::UnwindSafe for magic_sync::row::Apply
#[non_exhaustive] pub enum magic_sync::row::KeyKind
pub magic_sync::row::KeyKind::Integer
pub magic_sync::row::KeyKind::Uuid
impl core::clone::Clone for magic_sync::row::KeyKind
pub fn magic_sync::row::KeyKind::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::row::KeyKind
impl core::cmp::PartialEq for magic_sync::row::KeyKind
pub fn magic_sync::row::KeyKind::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::row::KeyKind
pub fn magic_sync::row::KeyKind::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::row::KeyKind
impl core::marker::StructuralPartialEq for magic_sync::row::KeyKind
impl core::marker::Freeze for magic_sync::row::KeyKind
impl core::marker::Send for magic_sync::row::KeyKind
impl core::marker::Sync for magic_sync::row::KeyKind
impl core::marker::Unpin for magic_sync::row::KeyKind
impl core::marker::UnsafeUnpin for magic_sync::row::KeyKind
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::row::KeyKind
impl core::panic::unwind_safe::UnwindSafe for magic_sync::row::KeyKind
#[non_exhaustive] pub enum magic_sync::row::KeyPart
pub magic_sync::row::KeyPart::Int(i64)
pub magic_sync::row::KeyPart::Uuid(uuid::Uuid)
impl core::clone::Clone for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::row::KeyPart
impl core::cmp::Ord for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::cmp(&self, &Self) -> core::cmp::Ordering
impl core::cmp::PartialEq for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::eq(&self, &Self) -> bool
impl core::cmp::PartialOrd for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::partial_cmp(&self, &Self) -> core::option::Option<core::cmp::Ordering>
impl core::fmt::Debug for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::fmt::Display for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::hash::Hash for magic_sync::row::KeyPart
pub fn magic_sync::row::KeyPart::hash<__H: core::hash::Hasher>(&self, &mut __H)
impl core::marker::Copy for magic_sync::row::KeyPart
impl core::marker::StructuralPartialEq for magic_sync::row::KeyPart
impl core::marker::Freeze for magic_sync::row::KeyPart
impl core::marker::Send for magic_sync::row::KeyPart
impl core::marker::Sync for magic_sync::row::KeyPart
impl core::marker::Unpin for magic_sync::row::KeyPart
impl core::marker::UnsafeUnpin for magic_sync::row::KeyPart
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::row::KeyPart
impl core::panic::unwind_safe::UnwindSafe for magic_sync::row::KeyPart
#[non_exhaustive] pub enum magic_sync::row::Mirror
pub magic_sync::row::Mirror::Both
pub magic_sync::row::Mirror::Catalog
pub magic_sync::row::Mirror::Record
pub magic_sync::row::Mirror::Setting
impl core::clone::Clone for magic_sync::row::Mirror
pub fn magic_sync::row::Mirror::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::row::Mirror
impl core::cmp::PartialEq for magic_sync::row::Mirror
pub fn magic_sync::row::Mirror::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::row::Mirror
pub fn magic_sync::row::Mirror::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::row::Mirror
impl core::marker::StructuralPartialEq for magic_sync::row::Mirror
impl core::marker::Freeze for magic_sync::row::Mirror
impl core::marker::Send for magic_sync::row::Mirror
impl core::marker::Sync for magic_sync::row::Mirror
impl core::marker::Unpin for magic_sync::row::Mirror
impl core::marker::UnsafeUnpin for magic_sync::row::Mirror
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::row::Mirror
impl core::panic::unwind_safe::UnwindSafe for magic_sync::row::Mirror
#[non_exhaustive] pub enum magic_sync::row::VersionKind
pub magic_sync::row::VersionKind::Instant
pub magic_sync::row::VersionKind::Integer
impl core::clone::Clone for magic_sync::row::VersionKind
pub fn magic_sync::row::VersionKind::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::row::VersionKind
impl core::cmp::PartialEq for magic_sync::row::VersionKind
pub fn magic_sync::row::VersionKind::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::row::VersionKind
pub fn magic_sync::row::VersionKind::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::row::VersionKind
impl core::marker::StructuralPartialEq for magic_sync::row::VersionKind
impl core::marker::Freeze for magic_sync::row::VersionKind
impl core::marker::Send for magic_sync::row::VersionKind
impl core::marker::Sync for magic_sync::row::VersionKind
impl core::marker::Unpin for magic_sync::row::VersionKind
impl core::marker::UnsafeUnpin for magic_sync::row::VersionKind
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::row::VersionKind
impl core::panic::unwind_safe::UnwindSafe for magic_sync::row::VersionKind
pub trait magic_sync::row::Columns: crate::__private::Sealed
pub trait magic_sync::row::KeyValue
pub const magic_sync::row::KeyValue::KIND: magic_sync::row::KeyKind
pub fn magic_sync::row::KeyValue::key_part(&self) -> magic_sync::row::KeyPart
impl magic_sync::row::KeyValue for i16
pub const i16::KIND: magic_sync::row::KeyKind
pub fn i16::key_part(&self) -> magic_sync::row::KeyPart
impl magic_sync::row::KeyValue for i32
pub const i32::KIND: magic_sync::row::KeyKind
pub fn i32::key_part(&self) -> magic_sync::row::KeyPart
impl magic_sync::row::KeyValue for i64
pub const i64::KIND: magic_sync::row::KeyKind
pub fn i64::key_part(&self) -> magic_sync::row::KeyPart
impl magic_sync::row::KeyValue for uuid::Uuid
pub const uuid::Uuid::KIND: magic_sync::row::KeyKind
pub fn uuid::Uuid::key_part(&self) -> magic_sync::row::KeyPart
pub trait magic_sync::row::Row: magic_sync::row::Columns + for<'r> sqlx_core::from_row::FromRow<'r, <__private::Db as sqlx_core::database::Database>::Row> + core::marker::Send + core::marker::Unpin + 'static
pub const magic_sync::row::Row::KEY: &'static [&'static str]
pub const magic_sync::row::Row::MIRROR: magic_sync::row::Mirror
pub const magic_sync::row::Row::SCHEMA: &'static str
pub const magic_sync::row::Row::TABLE: &'static str
pub fn magic_sync::row::Row::key(&self) -> magic_sync::row::Key
pub fn magic_sync::row::Row::key_text(&self) -> alloc::string::String
pub trait magic_sync::row::Setting: magic_sync::row::Row + core::clone::Clone + core::marker::Sync
pub trait magic_sync::row::Version: core::marker::Sized
pub const magic_sync::row::Version::KIND: magic_sync::row::VersionKind
pub fn magic_sync::row::Version::raised(&self) -> Self
pub fn magic_sync::row::Version::text(&self) -> alloc::string::String
impl magic_sync::row::Version for chrono::naive::datetime::NaiveDateTime
pub const chrono::naive::datetime::NaiveDateTime::KIND: magic_sync::row::VersionKind
pub fn chrono::naive::datetime::NaiveDateTime::raised(&self) -> Self
pub fn chrono::naive::datetime::NaiveDateTime::text(&self) -> alloc::string::String
impl magic_sync::row::Version for i16
pub const i16::KIND: magic_sync::row::VersionKind
pub fn i16::raised(&self) -> Self
pub fn i16::text(&self) -> alloc::string::String
impl magic_sync::row::Version for i32
pub const i32::KIND: magic_sync::row::VersionKind
pub fn i32::raised(&self) -> Self
pub fn i32::text(&self) -> alloc::string::String
impl magic_sync::row::Version for i64
pub const i64::KIND: magic_sync::row::VersionKind
pub fn i64::raised(&self) -> Self
pub fn i64::text(&self) -> alloc::string::String
impl<Tz: chrono::offset::TimeZone> magic_sync::row::Version for chrono::datetime::DateTime<Tz>
pub const chrono::datetime::DateTime<Tz>::KIND: magic_sync::row::VersionKind
pub fn chrono::datetime::DateTime<Tz>::raised(&self) -> Self
pub fn chrono::datetime::DateTime<Tz>::text(&self) -> alloc::string::String
pub type magic_sync::row::Key = alloc::vec::Vec<magic_sync::row::KeyPart>
pub mod magic_sync::run
pub mod magic_sync::run::replica
#[non_exhaustive] pub enum magic_sync::run::replica::Outcome
pub magic_sync::run::replica::Outcome::Applied
pub magic_sync::run::replica::Outcome::Later(alloc::string::String)
pub magic_sync::run::replica::Outcome::Refused(alloc::string::String)
impl core::clone::Clone for magic_sync::run::replica::Outcome
pub fn magic_sync::run::replica::Outcome::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::run::replica::Outcome
impl core::cmp::PartialEq for magic_sync::run::replica::Outcome
pub fn magic_sync::run::replica::Outcome::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::run::replica::Outcome
pub fn magic_sync::run::replica::Outcome::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::StructuralPartialEq for magic_sync::run::replica::Outcome
impl core::marker::Freeze for magic_sync::run::replica::Outcome
impl core::marker::Send for magic_sync::run::replica::Outcome
impl core::marker::Sync for magic_sync::run::replica::Outcome
impl core::marker::Unpin for magic_sync::run::replica::Outcome
impl core::marker::UnsafeUnpin for magic_sync::run::replica::Outcome
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Outcome
impl core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Outcome
pub struct magic_sync::run::replica::Direct
impl core::clone::Clone for magic_sync::run::replica::Direct
pub fn magic_sync::run::replica::Direct::clone(&self) -> Self
impl core::default::Default for magic_sync::run::replica::Direct
pub fn magic_sync::run::replica::Direct::default() -> Self
impl core::fmt::Debug for magic_sync::run::replica::Direct
pub fn magic_sync::run::replica::Direct::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::run::replica::Direct
impl<R: magic_sync::row::Setting> magic_sync::run::replica::CarryOut<R> for magic_sync::run::replica::Direct
pub async fn magic_sync::run::replica::Direct::carry_out(&self, magic_sync::run::replica::Wish<R>) -> magic_sync::run::replica::Outcome
impl core::marker::Freeze for magic_sync::run::replica::Direct
impl core::marker::Send for magic_sync::run::replica::Direct
impl core::marker::Sync for magic_sync::run::replica::Direct
impl core::marker::Unpin for magic_sync::run::replica::Direct
impl core::marker::UnsafeUnpin for magic_sync::run::replica::Direct
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Direct
impl core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Direct
pub struct magic_sync::run::replica::Replica<P: 'static, I: magic_sync::run::replica::Identity, U: magic_sync::run::replica::Uplink>
impl<P: core::marker::Sync + 'static, I: magic_sync::run::replica::Identity, U: magic_sync::run::replica::Uplink> magic_sync::run::replica::Replica<P, I, U>
pub async fn magic_sync::run::replica::Replica<P, I, U>::new(sqlx_sqlite::SqlitePool, alloc::vec::Vec<magic_sync::wire::Codec<P>>, I, U, magic_sync::run::replica::Settings) -> core::result::Result<Self, magic_sync::Error>
pub fn magic_sync::run::replica::Replica<P, I, U>::nudge(&self)
pub fn magic_sync::run::replica::Replica<P, I, U>::offer_wishes(&self)
pub async fn magic_sync::run::replica::Replica<P, I, U>::receive(&self, &[u8]) -> core::result::Result<magic_sync::replica::Received, magic_sync::Error>
pub async fn magic_sync::run::replica::Replica<P, I, U>::run(&self, impl core::future::future::Future<Output = ()>)
impl<P: 'static, I: magic_sync::run::replica::Identity, U: magic_sync::run::replica::Uplink> core::fmt::Debug for magic_sync::run::replica::Replica<P, I, U>
pub fn magic_sync::run::replica::Replica<P, I, U>::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl<P, I, U> !core::marker::Freeze for magic_sync::run::replica::Replica<P, I, U>
impl<P, I, U> core::marker::Send for magic_sync::run::replica::Replica<P, I, U> where alloc::vec::Vec<magic_sync::wire::Codec<P>>: core::marker::Send
impl<P, I, U> core::marker::Sync for magic_sync::run::replica::Replica<P, I, U> where alloc::vec::Vec<magic_sync::wire::Codec<P>>: core::marker::Sync
impl<P, I, U> core::marker::Unpin for magic_sync::run::replica::Replica<P, I, U> where alloc::vec::Vec<magic_sync::wire::Codec<P>>: core::marker::Unpin, I: core::marker::Unpin, U: core::marker::Unpin
impl<P, I, U> core::marker::UnsafeUnpin for magic_sync::run::replica::Replica<P, I, U> where alloc::vec::Vec<magic_sync::wire::Codec<P>>: core::marker::UnsafeUnpin, I: core::marker::UnsafeUnpin, U: core::marker::UnsafeUnpin
impl<P, I, U> !core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Replica<P, I, U>
impl<P, I, U> !core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Replica<P, I, U>
#[non_exhaustive] pub struct magic_sync::run::replica::Settings
pub magic_sync::run::replica::Settings::backoff: magic_sync::run::Backoff
pub magic_sync::run::replica::Settings::digests_every: core::time::Duration
pub magic_sync::run::replica::Settings::digests_first: core::time::Duration
pub magic_sync::run::replica::Settings::idle: core::time::Duration
pub magic_sync::run::replica::Settings::inbound: magic_sync::envelope::Limits
pub magic_sync::run::replica::Settings::lanes: alloc::vec::Vec<magic_sync::replica::Lane>
pub magic_sync::run::replica::Settings::outbox: magic_sync::replica::Outbox
pub magic_sync::run::replica::Settings::send_timeout: core::time::Duration
pub magic_sync::run::replica::Settings::wishes: magic_sync::run::replica::Wishes
pub magic_sync::run::replica::Settings::wishes_every: core::time::Duration
pub magic_sync::run::replica::Settings::wishes_timeout: core::time::Duration
impl core::clone::Clone for magic_sync::run::replica::Settings
pub fn magic_sync::run::replica::Settings::clone(&self) -> Self
impl core::default::Default for magic_sync::run::replica::Settings
pub fn magic_sync::run::replica::Settings::default() -> Self
impl core::fmt::Debug for magic_sync::run::replica::Settings
pub fn magic_sync::run::replica::Settings::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::run::replica::Settings
impl core::marker::Send for magic_sync::run::replica::Settings
impl core::marker::Sync for magic_sync::run::replica::Settings
impl core::marker::Unpin for magic_sync::run::replica::Settings
impl core::marker::UnsafeUnpin for magic_sync::run::replica::Settings
impl !core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Settings
impl !core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Settings
#[non_exhaustive] pub struct magic_sync::run::replica::Wish<R>
pub magic_sync::run::replica::Wish::held: R
pub magic_sync::run::replica::Wish::note: core::option::Option<alloc::string::String>
pub magic_sync::run::replica::Wish::version: i64
pub magic_sync::run::replica::Wish::wanted: R
impl<R> magic_sync::run::replica::Wish<R>
pub fn magic_sync::run::replica::Wish<R>::new(R, R, i64) -> Self
pub fn magic_sync::run::replica::Wish<R>::with_note(self, impl core::convert::Into<alloc::string::String>) -> Self
impl<R: core::clone::Clone> core::clone::Clone for magic_sync::run::replica::Wish<R>
pub fn magic_sync::run::replica::Wish<R>::clone(&self) -> Self
impl<R: core::fmt::Debug> core::fmt::Debug for magic_sync::run::replica::Wish<R>
pub fn magic_sync::run::replica::Wish<R>::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl<R> core::marker::Freeze for magic_sync::run::replica::Wish<R> where R: core::marker::Freeze + core::marker::Freeze
impl<R> core::marker::Send for magic_sync::run::replica::Wish<R> where R: core::marker::Send + core::marker::Send
impl<R> core::marker::Sync for magic_sync::run::replica::Wish<R> where R: core::marker::Sync + core::marker::Sync
impl<R> core::marker::Unpin for magic_sync::run::replica::Wish<R> where R: core::marker::Unpin + core::marker::Unpin
impl<R> core::marker::UnsafeUnpin for magic_sync::run::replica::Wish<R> where R: core::marker::UnsafeUnpin + core::marker::UnsafeUnpin
impl<R> core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Wish<R> where R: core::panic::unwind_safe::RefUnwindSafe + core::panic::unwind_safe::RefUnwindSafe
impl<R> core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Wish<R> where R: core::panic::unwind_safe::UnwindSafe + core::panic::unwind_safe::UnwindSafe
pub struct magic_sync::run::replica::Wishes
impl magic_sync::run::replica::Wishes
pub fn magic_sync::run::replica::Wishes::new() -> Self
pub fn magic_sync::run::replica::Wishes::on<R: magic_sync::row::Setting>(self, impl magic_sync::run::replica::CarryOut<R>) -> Self
impl core::clone::Clone for magic_sync::run::replica::Wishes
pub fn magic_sync::run::replica::Wishes::clone(&self) -> Self
impl core::default::Default for magic_sync::run::replica::Wishes
pub fn magic_sync::run::replica::Wishes::default() -> Self
impl core::fmt::Debug for magic_sync::run::replica::Wishes
pub fn magic_sync::run::replica::Wishes::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::run::replica::Wishes
impl core::marker::Send for magic_sync::run::replica::Wishes
impl core::marker::Sync for magic_sync::run::replica::Wishes
impl core::marker::Unpin for magic_sync::run::replica::Wishes
impl core::marker::UnsafeUnpin for magic_sync::run::replica::Wishes
impl !core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::replica::Wishes
impl !core::panic::unwind_safe::UnwindSafe for magic_sync::run::replica::Wishes
pub trait magic_sync::run::replica::CarryOut<R: magic_sync::row::Setting>: core::marker::Send + core::marker::Sync + 'static
pub fn magic_sync::run::replica::CarryOut::carry_out(&self, magic_sync::run::replica::Wish<R>) -> impl core::future::future::Future<Output = magic_sync::run::replica::Outcome> + core::marker::Send
impl<R: magic_sync::row::Setting> magic_sync::run::replica::CarryOut<R> for magic_sync::run::replica::Direct
pub async fn magic_sync::run::replica::Direct::carry_out(&self, magic_sync::run::replica::Wish<R>) -> magic_sync::run::replica::Outcome
pub trait magic_sync::run::replica::Identity: core::marker::Send + core::marker::Sync + 'static
pub fn magic_sync::run::replica::Identity::id(&self, &mut magic_sync::Conn) -> impl core::future::future::Future<Output = core::result::Result<core::option::Option<uuid::Uuid>, magic_sync::Error>> + core::marker::Send
impl magic_sync::run::replica::Identity for uuid::Uuid
pub async fn uuid::Uuid::id(&self, &mut magic_sync::Conn) -> core::result::Result<core::option::Option<uuid::Uuid>, magic_sync::Error>
pub trait magic_sync::run::replica::Uplink: core::marker::Send + core::marker::Sync + 'static
pub fn magic_sync::run::replica::Uplink::send(&self, uuid::Uuid, &'static str, alloc::vec::Vec<u8>) -> impl core::future::future::Future<Output = core::result::Result<(), magic_sync::Error>> + core::marker::Send
#[non_exhaustive] pub struct magic_sync::run::Backoff
pub magic_sync::run::Backoff::first: core::time::Duration
pub magic_sync::run::Backoff::max: core::time::Duration
impl magic_sync::run::Backoff
pub const fn magic_sync::run::Backoff::new(core::time::Duration, core::time::Duration) -> Self
impl core::clone::Clone for magic_sync::run::Backoff
pub fn magic_sync::run::Backoff::clone(&self) -> Self
impl core::cmp::Eq for magic_sync::run::Backoff
impl core::cmp::PartialEq for magic_sync::run::Backoff
pub fn magic_sync::run::Backoff::eq(&self, &Self) -> bool
impl core::fmt::Debug for magic_sync::run::Backoff
pub fn magic_sync::run::Backoff::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Copy for magic_sync::run::Backoff
impl core::marker::StructuralPartialEq for magic_sync::run::Backoff
impl core::marker::Freeze for magic_sync::run::Backoff
impl core::marker::Send for magic_sync::run::Backoff
impl core::marker::Sync for magic_sync::run::Backoff
impl core::marker::Unpin for magic_sync::run::Backoff
impl core::marker::UnsafeUnpin for magic_sync::run::Backoff
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::run::Backoff
impl core::panic::unwind_safe::UnwindSafe for magic_sync::run::Backoff
pub mod magic_sync::wire
pub struct magic_sync::wire::Codec<P>
impl<P: core::marker::Sync + 'static> magic_sync::wire::Codec<P>
pub fn magic_sync::wire::Codec<P>::json<R>(core::option::Option<magic_sync::wire::Place<R, P>>) -> Self where R: magic_sync::row::Row + core::clone::Clone + core::marker::Send + core::marker::Sync + serde_core::ser::Serialize + serde_core::de::DeserializeOwned
pub fn magic_sync::wire::Codec<P>::new<R, M>(fn(R) -> core::result::Result<M, magic_sync::wire::MapError>, fn(M) -> core::result::Result<R, magic_sync::wire::MapError>, core::option::Option<magic_sync::wire::Place<R, P>>) -> Self where R: magic_sync::row::Row + core::clone::Clone + core::marker::Send + core::marker::Sync, M: prost::message::Message + core::default::Default + 'static
impl<P> core::fmt::Debug for magic_sync::wire::Codec<P>
pub fn magic_sync::wire::Codec<P>::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl<P> core::marker::Freeze for magic_sync::wire::Codec<P> where alloc::boxed::Box<dyn Ops<P>>: core::marker::Freeze
impl<P> core::marker::Send for magic_sync::wire::Codec<P> where alloc::boxed::Box<dyn Ops<P>>: core::marker::Send
impl<P> core::marker::Sync for magic_sync::wire::Codec<P> where alloc::boxed::Box<dyn Ops<P>>: core::marker::Sync
impl<P> core::marker::Unpin for magic_sync::wire::Codec<P> where alloc::boxed::Box<dyn Ops<P>>: core::marker::Unpin
impl<P> core::marker::UnsafeUnpin for magic_sync::wire::Codec<P> where alloc::boxed::Box<dyn Ops<P>>: core::marker::UnsafeUnpin
impl<P> !core::panic::unwind_safe::RefUnwindSafe for magic_sync::wire::Codec<P>
impl<P> !core::panic::unwind_safe::UnwindSafe for magic_sync::wire::Codec<P>
pub struct magic_sync::wire::MapError(_)
impl magic_sync::wire::MapError
pub fn magic_sync::wire::MapError::new(impl core::fmt::Display) -> Self
impl core::fmt::Debug for magic_sync::wire::MapError
pub fn magic_sync::wire::MapError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::fmt::Display for magic_sync::wire::MapError
pub fn magic_sync::wire::MapError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl<E: core::error::Error> core::convert::From<E> for magic_sync::wire::MapError
pub fn magic_sync::wire::MapError::from(E) -> Self
impl core::marker::Freeze for magic_sync::wire::MapError
impl core::marker::Send for magic_sync::wire::MapError
impl core::marker::Sync for magic_sync::wire::MapError
impl core::marker::Unpin for magic_sync::wire::MapError
impl core::marker::UnsafeUnpin for magic_sync::wire::MapError
impl core::panic::unwind_safe::RefUnwindSafe for magic_sync::wire::MapError
impl core::panic::unwind_safe::UnwindSafe for magic_sync::wire::MapError
pub type magic_sync::wire::Place<R, P> = fn(&mut R, uuid::Uuid, &P)
#[non_exhaustive] pub enum magic_sync::Error
pub magic_sync::Error::Database(sqlx_core::error::Error)
#[non_exhaustive] pub magic_sync::Error::Host
pub magic_sync::Error::Host::reason: alloc::string::String
pub magic_sync::Error::Host::transient: bool
pub magic_sync::Error::Malformed
pub magic_sync::Error::Malformed::reason: alloc::string::String
pub magic_sync::Error::Malformed::table: alloc::string::String
pub magic_sync::Error::Misuse(alloc::string::String)
pub magic_sync::Error::Protocol
pub magic_sync::Error::Protocol::ours: u32
pub magic_sync::Error::Protocol::theirs: u32
#[non_exhaustive] pub magic_sync::Error::Transport
pub magic_sync::Error::Transport::reason: alloc::string::String
pub magic_sync::Error::Transport::transient: bool
impl magic_sync::Error
pub fn magic_sync::Error::host(bool, impl core::convert::Into<alloc::string::String>) -> Self
pub fn magic_sync::Error::is_transient(&self) -> bool
pub fn magic_sync::Error::transport(bool, impl core::convert::Into<alloc::string::String>) -> Self
impl core::convert::From<sqlx_core::error::Error> for magic_sync::Error
pub fn magic_sync::Error::from(sqlx_core::error::Error) -> Self
impl core::error::Error for magic_sync::Error
pub fn magic_sync::Error::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
impl core::fmt::Debug for magic_sync::Error
pub fn magic_sync::Error::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::fmt::Display for magic_sync::Error
pub fn magic_sync::Error::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
impl core::marker::Freeze for magic_sync::Error
impl core::marker::Send for magic_sync::Error
impl core::marker::Sync for magic_sync::Error
impl core::marker::Unpin for magic_sync::Error
impl core::marker::UnsafeUnpin for magic_sync::Error
impl !core::panic::unwind_safe::RefUnwindSafe for magic_sync::Error
impl !core::panic::unwind_safe::UnwindSafe for magic_sync::Error
pub const magic_sync::REPLICA_SCHEMA_VERSION: i32
pub trait magic_sync::Columns: crate::__private::Sealed
pub trait magic_sync::Row: magic_sync::row::Columns + for<'r> sqlx_core::from_row::FromRow<'r, <__private::Db as sqlx_core::database::Database>::Row> + core::marker::Send + core::marker::Unpin + 'static
pub const magic_sync::Row::KEY: &'static [&'static str]
pub const magic_sync::Row::MIRROR: magic_sync::row::Mirror
pub const magic_sync::Row::SCHEMA: &'static str
pub const magic_sync::Row::TABLE: &'static str
pub fn magic_sync::Row::key(&self) -> magic_sync::row::Key
pub fn magic_sync::Row::key_text(&self) -> alloc::string::String
pub type magic_sync::Conn = sqlx_sqlite::connection::SqliteConnection