pub struct ToolSession {
pub index_store: Option<IndexStore>,
/* private fields */
}Fields§
§index_store: Option<IndexStore>Schema index root; None disables Phase 3 tools with an actionable error.
Implementations§
Source§impl ToolSession
impl ToolSession
pub fn connections(&self) -> Vec<ConnectionInfo>
Sourcepub fn register_profile(
&self,
name: &str,
profile: &ProfileConfig,
default_mode: AccessMode,
default_caps: PolicyCaps,
) -> Result<(), ToolError>
pub fn register_profile( &self, name: &str, profile: &ProfileConfig, default_mode: AccessMode, default_caps: PolicyCaps, ) -> Result<(), ToolError>
Register or update a profile in the live session (after save/import/setup).
pub fn mark_index_stale(&self, connection_id: &str, database: &str)
pub fn clear_index_stale(&self, connection_id: &str, database: &str)
pub fn is_index_stale(&self, connection_id: &str, database: &str) -> bool
pub fn access_mode(&self) -> AccessMode
pub fn caps(&self) -> PolicyCaps
pub fn filter(&self) -> PolicyFilter
pub fn pool_opts(&self) -> PoolOptions
pub async fn from_resolved( resolved: ResolvedConnection, access_mode: AccessMode, caps: PolicyCaps, ) -> Result<Arc<Self>, ToolError>
pub async fn from_connections( connections: Vec<ConnectionInfo>, active_id: Option<String>, ) -> Result<Arc<Self>, ToolError>
pub async fn from_connections_with_filter( connections: Vec<ConnectionInfo>, access_mode: AccessMode, caps: PolicyCaps, active_id: Option<String>, filter: PolicyFilter, ) -> Result<Arc<Self>, ToolError>
pub async fn active_context(&self) -> (String, String)
pub async fn switch( &self, connection_id: &str, database: Option<String>, ) -> Result<(), ToolError>
pub async fn checkout(&self) -> Result<Object, ToolError>
Auto Trait Implementations§
impl !Freeze for ToolSession
impl !RefUnwindSafe for ToolSession
impl !UnwindSafe for ToolSession
impl Send for ToolSession
impl Sync for ToolSession
impl Unpin for ToolSession
impl UnsafeUnpin for ToolSession
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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