Delta class

An incremental change set (protocol.md § Delta).

Constructors

Delta({required Epoch baseEpoch, required Epoch epoch, List<DeltaOp> ops = const []})
const
Delta.next(Epoch baseEpoch, [List<DeltaOp> ops = const []])
The next sequential delta after baseEpoch carrying ops.
factory

Properties

baseEpoch int
final
epoch int
final
hashCode int
The hash code for this object.
no setteroverride
ops List<DeltaOp>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
span int
The accepted-event span this delta advances: epoch - baseEpoch (usually 1, > 1 for a coalesced multi-epoch-span delta, #lzsync). Saturates at 0 for a malformed backward delta. Mirrors Delta::span in lazily-rs.
no setter

Methods

applyStatus(Epoch lastEpoch) DeltaApplyStatus
lean applyDelta: apply iff sequential, otherwise fail closed.
filterReadable(PeerPermissions permissions, PeerId peer) Delta
Drop ops whose target node(s) are unreadable by peer (omission).
isNextAfter(Epoch lastEpoch) bool
lean isSequentialAfter: true iff this delta continues immediately after lastEpoch.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toWire() Map<String, Object>
writeJson(StringSink sink) → void
Streaming JSON encoder (#lzdartstreamingjson): writes the canonical JSON for this Delta directly into sink, avoiding the intermediate Map<String, Object> and the ops List allocation that toWire would produce. Byte-identical to jsonEncode(toWire()).

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromWire(Object? value) Delta