pamoja-sync 0.1.17

Offline-first store-and-forward buffering for pamoja: durable queues behind the core Store trait.
Documentation
<!-- Generated by `cargo xtask docs` from this crate's lib.rs; edit the crate doc, not this file. -->

# pamoja-sync

Offline-first store-and-forward buffering for pamoja: durable queues behind the core Store trait.

<a href="https://pamoja.molex.cloud/docs/reference/rust/pamoja_sync/index.html"><img height="28" alt="API reference" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-api.svg"></a>
<a href="https://pamoja.molex.cloud/docs/guides/sync.html"><img height="28" alt="read the guide" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-guide.svg"></a>
<a href="https://crates.io/crates/pamoja-sync"><img height="28" alt="crates.io" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-cratesio.svg"></a>
<a href="https://docs.rs/pamoja-sync"><img height="28" alt="docs.rs" src="https://raw.githubusercontent.com/molexxxx/pamoja/main/.github/badges/btn-docsrs.svg"></a>

## The same capability in every language

| Language | Package | Reference |
| --- | --- | --- |
| Rust | [`pamoja-sync`]https://crates.io/crates/pamoja-sync | [reference]https://pamoja.molex.cloud/docs/reference/rust/pamoja_sync/index.html, [docs.rs]https://docs.rs/pamoja-sync, [install]https://pamoja.molex.cloud/docs/reference/rust.html#rust-sync |
| TypeScript | [`@pamoja/sync`]https://www.npmjs.com/package/@pamoja/sync | [reference]https://pamoja.molex.cloud/docs/reference/node/modules/_pamoja_sync.html, [install]https://pamoja.molex.cloud/docs/reference/node.html#node-sync |
| Python | [`pamoja-sync`]https://pypi.org/project/pamoja-sync/ | [reference]https://pamoja.molex.cloud/docs/reference/python/pamoja/sync.html, [install]https://pamoja.molex.cloud/docs/reference/python.html#python-sync |
| C# | [`Pamoja.Sync`]https://www.nuget.org/packages/Pamoja.Sync | [reference]https://pamoja.molex.cloud/docs/reference/dotnet/api/Pamoja.Sync.html, [install]https://pamoja.molex.cloud/docs/reference/dotnet.html#dotnet-sync |

Offline-first store-and-forward buffering for pamoja.

Devices on intermittent links append records while offline and drain them in
order when a link returns, so a node that is disconnected for hours or days
loses nothing. This crate provides durable first-in first-out implementations
of the core `Store` trait:

- `MemoryStore` - a fast in-memory queue, optionally capacity-bounded so a
  full queue becomes an explicit backpressure signal.
- `FileStore` - a crash-safe on-disk queue that survives power loss, for the
  power-loss-safe field logging the mission depends on.

Both buffer raw bytes, so an application pairs a `Store`
with a [`Codec`](https://docs.rs/pamoja-codec) to persist encoded payloads and
a `Transport` to forward them when a link appears.
`drain_to` is the forward half: it publishes buffered records onto a
transport in order, removing each only after it is sent, so a failed link
loses nothing.

## License

MIT - part of the [pamoja](https://github.com/molexxxx/pamoja) workspace: one memory-safe Rust core with bindings for every language.