Expand description
Signal K is the single source of truth for crate::Route. This
module is not a sync backend but the only backend – see
waypoints::signalk’s own doc for the fuller reasoning, including
the callback-shaped spawn_* functions.
Signal K’s Resources API has no conditional write (no ETag, no
If-Match), so save always replaces the server’s whole copy,
the same “last write wins” a plain PUT implies. This crate keeps
no local copy to detect that collision against, the same trade
waypoints::signalk’s own doc explains.
Three operations: list everything the server holds, save
one (create or replace – the caller always supplies the id, see
crate::Route::uuid’s own doc, so this is always Signal K’s
PUT, never its id-minting POST), and delete one.
Traits§
- Resources
Backend - What
list/save/deleteneed from a Signal K resources connection – exactlyClient’s own three route methods, factored out so this module’s own translation logic can be tested against a fake, without a real server, the same reasonwaypoints::signalk’s ownResourcesBackendexists.
Functions§
- delete
- Deletes a route by id.
- list
- Every route the server currently holds.
- save
- Creates or replaces
routeat its own id. - spawn_
delete spawn_list’s own doc,deleteinstead oflist.- spawn_
list - Runs
liston a thread of its own, callingon_donewith the result once it has finished. See this module’s own doc, andwaypoints::signalk’s, for the callback shape. - spawn_
save spawn_list’s own doc,saveinstead oflist.