pub struct SessionStore { /* private fields */ }Expand description
In-memory SavedQueryStore for ephemeral workspaces. Entries live in
a Mutex<HashMap> and vanish when the server process exits.
Intentional: reusing the saved query registry across restarts would be surprising when the workspace itself is ephemeral, since the underlying tables aren’t persisted either.
Implementations§
Source§impl SessionStore
impl SessionStore
Trait Implementations§
Source§impl Debug for SessionStore
impl Debug for SessionStore
Source§impl Default for SessionStore
impl Default for SessionStore
Source§fn default() -> SessionStore
fn default() -> SessionStore
Returns the “default value” for a type. Read more
Source§impl SavedQueryStore for SessionStore
impl SavedQueryStore for SessionStore
Source§fn save(
&self,
_engine: Option<&Engine>,
query: SavedQuery,
) -> Result<(), McpError>
fn save( &self, _engine: Option<&Engine>, query: SavedQuery, ) -> Result<(), McpError>
Persist a new query. Returns an
AlreadyExists-class error
(currently SchemaMismatch, with a clear message) if name is
already in use — callers should delete first if overwriting is
intended. Read moreSource§fn get(
&self,
_engine: Option<&Engine>,
name: &str,
) -> Result<Option<SavedQuery>, McpError>
fn get( &self, _engine: Option<&Engine>, name: &str, ) -> Result<Option<SavedQuery>, McpError>
Retrieve a single saved query by name, or
Ok(None) if not found. Read moreAuto Trait Implementations§
impl !Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request