pub struct PresetRegistry { /* private fields */ }Expand description
Ordered registry of PresetSource impls.
Sources registered earlier win detection ties. The default registry is
[TomlPresetSource, YamlPresetSource] — TOML-dir first because its
detection is strict (requires a directory with two specific TOML files),
YAML second as the permissive fallback.
Implementations§
Source§impl PresetRegistry
impl PresetRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Empty registry. Use PresetRegistry::default for the shipped sources.
Sourcepub fn register(self, source: Box<dyn PresetSource>) -> Self
pub fn register(self, source: Box<dyn PresetSource>) -> Self
Append a source to the registry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PresetRegistry
impl !RefUnwindSafe for PresetRegistry
impl Send for PresetRegistry
impl Sync for PresetRegistry
impl Unpin for PresetRegistry
impl UnsafeUnpin for PresetRegistry
impl !UnwindSafe for PresetRegistry
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