pub struct MjolnirAdapter { /* private fields */ }Expand description
Mjolnir’s sessions, as SessionWiki sees them.
Implementations§
Source§impl MjolnirAdapter
impl MjolnirAdapter
Sourcepub fn from_state(state: &State) -> Self
pub fn from_state(state: &State) -> Self
A fixed view of the given state, which is what a caller with a state in hand wants.
Sourcepub fn reloading(state: &State) -> Self
pub fn reloading(state: &State) -> Self
The same, but re-reading controller state when the indexer reaches this adapter.
One sync pass walks every other tool’s store first, which can take minutes on a large corpus. Without the reload, sessions that closed during that walk would be indexed with no record: no project, no start time, and the title guessed from the first prompt. Their checkpoints do not change afterwards, so nothing would ever correct them.
Trait Implementations§
Source§impl Adapter for MjolnirAdapter
impl Adapter for MjolnirAdapter
Source§fn discover(&self) -> Discovered
fn discover(&self) -> Discovered
Unused: this is a shared-store adapter, so the indexer enumerates
sessions through Adapter::store instead of walking files.
Source§fn reconcile_scope(&self) -> Option<String>
fn reconcile_scope(&self) -> Option<String>
Every Mjolnir instance publishes under one tool name, so this instance speaks only for keys under its own checkpoint directory. Without the scope, two instances would archive each other’s rows on every sync.
fn name(&self) -> &'static str
Source§fn root(&self) -> Option<PathBuf>
fn root(&self) -> Option<PathBuf>
Source§fn parse(&self, _path: &Path) -> Result<Session>
fn parse(&self, _path: &Path) -> Result<Session>
Auto Trait Implementations§
impl !Freeze for MjolnirAdapter
impl RefUnwindSafe for MjolnirAdapter
impl Send for MjolnirAdapter
impl Sync for MjolnirAdapter
impl Unpin for MjolnirAdapter
impl UnsafeUnpin for MjolnirAdapter
impl UnwindSafe for MjolnirAdapter
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more