pub struct MemorySource { /* private fields */ }Expand description
A configuration source that holds data in memory.
Useful for testing or providing default values.
Implementations§
Source§impl MemorySource
impl MemorySource
Sourcepub fn new(data: ConfigValue) -> Self
pub fn new(data: ConfigValue) -> Self
Create a new memory source with the given data.
Sourcepub fn with_name(data: ConfigValue, name: impl Into<String>) -> Self
pub fn with_name(data: ConfigValue, name: impl Into<String>) -> Self
Create a new memory source with a custom name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemorySource
impl RefUnwindSafe for MemorySource
impl Send for MemorySource
impl Sync for MemorySource
impl Unpin for MemorySource
impl UnwindSafe for MemorySource
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