pub enum PullReply {
NothingNew {
epoch: String,
version: u64,
},
Changes {
epoch: String,
version: u64,
upserts: Vec<Row>,
deletes: Vec<String>,
more: bool,
},
FullCopy {
epoch: String,
version: u64,
rows: Vec<Row>,
next: Option<String>,
head: Option<u64>,
},
}Expand description
An app’s answer to one pull (section 4.2).
Variants§
NothingNew
{"e":"k3f9a2c1","v":41}
Fields
Changes
{"e":…,"v":43,"u":[…],"x":[…]} plus "m":1 when more remain.
Fields
FullCopy
{"e":…,"v":7,"f":1,"u":[…]} plus "n":"<last key>" when more pages
remain, and "h" on a later page read after the head moved. Rows are in
key order.
Implementations§
Source§impl PullReply
impl PullReply
Sourcepub fn version(&self) -> u64
pub fn version(&self) -> u64
The version the caller holds once it applied the reply (for a full copy, once its last page is in).
Sourcepub fn handed_out(&self) -> u64
pub fn handed_out(&self) -> u64
The highest version whose data the reply can carry: version, or "h"
on a later page of a full copy. The node keeps, per epoch, the highest of
these it has passed on, and answers an announce below it with rotate.
Sourcepub fn is_truncated(&self) -> bool
pub fn is_truncated(&self) -> bool
True when the caller must ask again to get the rest ("m":1 or "n").
The node records a reply’s head only when this is false.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PullReply
impl<'de> Deserialize<'de> for PullReply
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<PullReply> for SyncAnswer
impl From<PullReply> for SyncAnswer
impl StructuralPartialEq for PullReply
Auto Trait Implementations§
impl Forget for PullReply
impl Freeze for PullReplywhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Row>: Freeze,
PhantomData<String>: Freeze,
impl Move for PullReply
impl RefUnwindSafe for PullReply
impl Send for PullReply
impl Sync for PullReply
impl Unpin for PullReply
impl UnsafeUnpin for PullReplywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Row>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for PullReply
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more