pub struct RegistryConfig { /* private fields */ }Implementations§
Source§impl RegistryConfig
impl RegistryConfig
Sourcepub fn default_backend(&self) -> Option<&str>
pub fn default_backend(&self) -> Option<&str>
Returns default backend type, if one is configured. If none are configured and there is only one type of configured backend, this will return that type.
Sourcepub fn set_default_backend(&mut self, default_backend: Option<String>)
pub fn set_default_backend(&mut self, default_backend: Option<String>)
Sets the default backend type.
To unset the default backend type, pass None.
Sourcepub fn configured_backend_types(&self) -> impl Iterator<Item = &str>
pub fn configured_backend_types(&self) -> impl Iterator<Item = &str>
Returns an iterator of configured backend types.
Sourcepub fn backend_config<'a, T: Deserialize<'a>>(
&'a self,
backend_type: &str,
) -> Result<Option<T>, Error>
pub fn backend_config<'a, T: Deserialize<'a>>( &'a self, backend_type: &str, ) -> Result<Option<T>, Error>
Attempts to deserialize backend config with the given type.
Returns Ok(None) if no configuration was provided.
Returns Err if configuration was provided but deserialization failed.
Trait Implementations§
Source§impl Clone for RegistryConfig
impl Clone for RegistryConfig
Source§fn clone(&self) -> RegistryConfig
fn clone(&self) -> RegistryConfig
Returns a copy 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 RegistryConfig
impl Debug for RegistryConfig
Source§impl Default for RegistryConfig
impl Default for RegistryConfig
Source§fn default() -> RegistryConfig
fn default() -> RegistryConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RegistryConfig
impl RefUnwindSafe for RegistryConfig
impl Send for RegistryConfig
impl Sync for RegistryConfig
impl Unpin for RegistryConfig
impl UnwindSafe for RegistryConfig
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