pub enum DataFrame {
Whole {
seq: Seq,
state: Repr,
},
Ops {
seq: Seq,
ops: Vec<Op>,
},
}Expand description
A data patch frame: what a Mode B subscription carries instead of DOM ops (§5.1).
Two shapes rather than one, and the difference is the same one Resumption draws for Mode A:
a client with nothing gets the accumulator, and a client with a position gets the difference
from it. beck_core::delta is the vocabulary; this is the envelope it travels in.
Variants§
Whole
{"t":"s","q":<seq>,"v":<state>} — the whole accumulator, for a client with no position.
Ops
{"t":"d","q":<seq>,"o":[<op>...]} — the difference, for a client that has one.
Implementations§
Source§impl DataFrame
impl DataFrame
Sourcepub fn whole(seq: Seq, state: &Value) -> Option<DataFrame>
pub fn whole(seq: Seq, state: &Value) -> Option<DataFrame>
The whole accumulator, or nothing if it holds something unstorable — which the checker
makes unreachable (B0411), and which is a refusal rather than a fabrication here.
pub fn seq(&self) -> Seq
pub fn is_empty(&self) -> bool
pub fn to_json(&self) -> Value
Trait Implementations§
impl StructuralPartialEq for DataFrame
Auto Trait Implementations§
impl Freeze for DataFrame
impl RefUnwindSafe for DataFrame
impl Send for DataFrame
impl Sync for DataFrame
impl Unpin for DataFrame
impl UnwindSafe for DataFrame
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