pub enum OpenCodeStorageSurface {
Sqlite,
JsonTreeB,
JsonTreeA,
}Expand description
Which on-disk OpenCode storage surface is present under a data root
(docs/interop/opencode-pi-spec.md §1.2/S9a): SQLite opencode*.db (or
$OPENCODE_DB), legacy JSON tree generation B, or legacy JSON tree
generation A. This is a filesystem classifier only — it answers
“which generation is this?” for a corpus-discovery tool; it does not
itself read/parse the surface. See Session::from_opencode_str’s docs
for the envelope form any of these three surfaces synthesizes into, and
Session::from_opencode_sqlite (PARITY-3/PARITY-16) for the rusqlite
reader that reconstructs that same envelope form from Sqlite’s rows —
JsonTreeA/JsonTreeB remain classifier-only (their session_diff
round-trips via the JSON store per upstream’s own behavior even on a
SQLite install, so nothing is silently lost by not reading the legacy
trees directly).
Variants§
Sqlite
SQLite <data>/opencode*.db (or $OPENCODE_DB override). Read by
Session::from_opencode_sqlite / opencode_sqlite_store_stats /
opencode_sqlite_corpus_envelope_text.
JsonTreeB
Legacy JSON tree, generation B: <data>/storage/{session,message,part,session_diff}/…,
marker file storage/migration.
JsonTreeA
Legacy JSON tree, generation A: <data>/project/<slug>/storage/session/{info,message,part}/….
Trait Implementations§
Source§impl Clone for OpenCodeStorageSurface
impl Clone for OpenCodeStorageSurface
Source§fn clone(&self) -> OpenCodeStorageSurface
fn clone(&self) -> OpenCodeStorageSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OpenCodeStorageSurface
Source§impl Debug for OpenCodeStorageSurface
impl Debug for OpenCodeStorageSurface
impl Eq for OpenCodeStorageSurface
Source§impl PartialEq for OpenCodeStorageSurface
impl PartialEq for OpenCodeStorageSurface
impl StructuralPartialEq for OpenCodeStorageSurface
Auto Trait Implementations§
impl Freeze for OpenCodeStorageSurface
impl RefUnwindSafe for OpenCodeStorageSurface
impl Send for OpenCodeStorageSurface
impl Sync for OpenCodeStorageSurface
impl Unpin for OpenCodeStorageSurface
impl UnsafeUnpin for OpenCodeStorageSurface
impl UnwindSafe for OpenCodeStorageSurface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.