Skip to main content

Module bookmarks

Module bookmarks 

Source
Expand description

Bookmarks and recent locations for the sidebar.

§Bookmarks

BookmarkStore persists to ${app_config_dir}/bookmarks.json. Writes are atomic (write-to-tmp, rename) so a crash cannot corrupt the file.

§Recents

RecentsStore is an in-memory ring buffer (cap 50) that de-duplicates consecutive identical locations. The snapshot is written to ${app_config_dir}/recents.json on explicit flush (called from commands).

§OCP

  • Bookmark and RecentLocation are open for new optional fields (tags, color, …) via serde skip_serializing_if.
  • The validation gate is not in this module — it lives in the command layer (bookmarks_cmd.rs) so the store stays transport-agnostic.

Structs§

Bookmark
A persisted sidebar bookmark.
BookmarkInput
Input for BookmarkStore::add.
BookmarkPatch
Patch accepted by BookmarkStore::update.
BookmarkStore
Persisted list of bookmarks.
BookmarkStoreState
Wrapper that bundles the store with its backing file path.
RecentLocation
One visited S3 location recorded for the recents list.
RecentsStore
Ring buffer (cap 50) of recent locations.

Functions§

unix_ms_now 🔒

Type Aliases§

BookmarkStoreHandle
Shared handle for BookmarkStore.
RecentsHandle
Shared handle for RecentsStore.