Expand description
The sync source contract (spec/sync/README.md §5): the in-engine view
of an adapter — capabilities, enumerate/fetch, write/remove when
it writes through, a watch stream of WatchEvents when it can watch
(one Ready once the feed is primed, then Batches — §5 “Readiness”).
Every call crosses a pipe in production
(crate::external::ExternalSource); an in-memory source serves tests.
Structs§
- MemSource
- An in-memory source for tests: a
path → contentmap with a configurable capability set; writes and removes are applied to the map and logged. - Source
Capabilities - The handshake’s capabilities.
- Source
Entry - A member of the scope: its storage key and cheap change token.
- Source
Item - A hydrated member: the entry plus its bytes.
Enums§
- Readiness
- How
wait_readyended. - Source
Identity - How a source’s identity relates to omgbase block identity.
- Watch
Event - One unsolicited line of a live watch, as the wire carries it (§5):
{"event":"ready"}once the feed is primed, then{"event":"batch", "paths":[…]}per debounced batch of changed paths.
Traits§
- Sync
Source - The in-engine handle to a source.
Functions§
- wait_
ready - Wait up to
patiencefor the stream’sReady. AnyBatchthat arrives first is returned alongside, in order, so nothing the adapter reported before readiness is lost to the caller.