pub struct CodeMapRegistry { /* private fields */ }Expand description
Validated code maps loaded from daemon configuration.
Implementations§
Source§impl CodeMapRegistry
impl CodeMapRegistry
Sourcepub fn load(
code_map_root: Option<&str>,
entries: &[CodeMapConfig],
protected_databases: &[PathBuf],
) -> Self
pub fn load( code_map_root: Option<&str>, entries: &[CodeMapConfig], protected_databases: &[PathBuf], ) -> Self
Load valid entries and log each rejected entry without aborting the load.
protected_databases lists the shared production database paths whose
main files and SQLite companions must remain outside the map surface.
Sourcepub fn resolve(&self, name: &str) -> Result<&RegisteredCodeMap, RuntimeError>
pub fn resolve(&self, name: &str) -> Result<&RegisteredCodeMap, RuntimeError>
Resolve a registered map name without exposing rejected-entry details.
Sourcepub fn with_read<T>(
&self,
name: &str,
read: impl FnOnce(&Connection) -> Result<T, RuntimeError>,
) -> Result<T, RuntimeError>
pub fn with_read<T>( &self, name: &str, read: impl FnOnce(&Connection) -> Result<T, RuntimeError>, ) -> Result<T, RuntimeError>
Run a short read transaction against a currently registered rollback-mode map. The connection is closed before this method returns.
Trait Implementations§
Source§impl Debug for CodeMapRegistry
impl Debug for CodeMapRegistry
Auto Trait Implementations§
impl Freeze for CodeMapRegistry
impl RefUnwindSafe for CodeMapRegistry
impl Send for CodeMapRegistry
impl Sync for CodeMapRegistry
impl Unpin for CodeMapRegistry
impl UnsafeUnpin for CodeMapRegistry
impl UnwindSafe for CodeMapRegistry
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
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> ⓘ
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