pub struct CollationRegistry { /* private fields */ }Expand description
Registry for collation functions, keyed by case-insensitive name.
Pre-populated with the three built-in collations: BINARY, NOCASE, RTRIM.
Custom collations can be registered via CollationRegistry::register.
Implementations§
Source§impl CollationRegistry
impl CollationRegistry
Sourcepub fn register<C: CollationFunction + 'static>(
&mut self,
collation: C,
) -> Option<Arc<dyn CollationFunction>>
pub fn register<C: CollationFunction + 'static>( &mut self, collation: C, ) -> Option<Arc<dyn CollationFunction>>
Register a custom collation. Returns the previous collation with the same name if one existed (overwrites).
Collation names are case-insensitive.
Sourcepub fn find(&self, name: &str) -> Option<Arc<dyn CollationFunction>>
pub fn find(&self, name: &str) -> Option<Arc<dyn CollationFunction>>
Look up a collation by name (case-insensitive).
Returns None if no collation with the given name is registered.
Trait Implementations§
Source§impl Clone for CollationRegistry
impl Clone for CollationRegistry
Source§fn clone(&self) -> CollationRegistry
fn clone(&self) -> CollationRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollationRegistry
impl Debug for CollationRegistry
Auto Trait Implementations§
impl Freeze for CollationRegistry
impl !RefUnwindSafe for CollationRegistry
impl Send for CollationRegistry
impl Sync for CollationRegistry
impl Unpin for CollationRegistry
impl UnsafeUnpin for CollationRegistry
impl !UnwindSafe for CollationRegistry
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