pub struct PlatformRegistry { /* private fields */ }Expand description
String-keyed registry for platform dialects.
All dialects are indexed by their canonical string name
(e.g. "postgres", "snowflake", "mysql").
Implementations§
Source§impl PlatformRegistry
impl PlatformRegistry
Sourcepub fn register(&mut self, name: String, dialect: Arc<dyn PlatformDialect>)
pub fn register(&mut self, name: String, dialect: Arc<dyn PlatformDialect>)
Register a dialect by its canonical string name.
Sourcepub fn get_by_name(&self, name: &str) -> Option<&Arc<dyn PlatformDialect>>
pub fn get_by_name(&self, name: &str) -> Option<&Arc<dyn PlatformDialect>>
Resolve by string name (canonical path for all dialects).
Sourcepub fn resolve(&self, target: &str) -> Option<Arc<dyn PlatformDialect>>
pub fn resolve(&self, target: &str) -> Option<Arc<dyn PlatformDialect>>
Resolve by string — same as get_by_name.
Sourcepub fn list(&self) -> Vec<DialectInfo>
pub fn list(&self) -> Vec<DialectInfo>
List all registered dialects.
Sourcepub fn registered_names(&self) -> Vec<String>
pub fn registered_names(&self) -> Vec<String>
Sourcepub fn with_auto_discovered() -> Self
pub fn with_auto_discovered() -> Self
Build a registry pre-populated with all auto-discovered dialect crates.
Uses inventory to find every crate::builder::DialectRegistration
submitted at link time.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PlatformRegistry
impl !UnwindSafe for PlatformRegistry
impl Freeze for PlatformRegistry
impl Send for PlatformRegistry
impl Sync for PlatformRegistry
impl Unpin for PlatformRegistry
impl UnsafeUnpin for PlatformRegistry
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