pub struct TestEnvironmentProvider { /* private fields */ }
Expand description
Test environment variable provider implementation.
This implementation uses a predefined variable mapping, intended for complete isolation in test environments.
Implementations§
Source§impl TestEnvironmentProvider
impl TestEnvironmentProvider
Sourcepub fn with_variables(variables: HashMap<String, String>) -> Self
pub fn with_variables(variables: HashMap<String, String>) -> Self
Create a test provider containing specified variables.
§Arguments
variables
- Environment variable mapping
Sourcepub fn set_var(&mut self, key: &str, value: &str)
pub fn set_var(&mut self, key: &str, value: &str)
Set an environment variable.
§Arguments
key
- Environment variable namevalue
- Environment variable value
Sourcepub fn remove_var(&mut self, key: &str)
pub fn remove_var(&mut self, key: &str)
Trait Implementations§
Source§impl Debug for TestEnvironmentProvider
impl Debug for TestEnvironmentProvider
Source§impl Default for TestEnvironmentProvider
impl Default for TestEnvironmentProvider
Auto Trait Implementations§
impl Freeze for TestEnvironmentProvider
impl RefUnwindSafe for TestEnvironmentProvider
impl Send for TestEnvironmentProvider
impl Sync for TestEnvironmentProvider
impl Unpin for TestEnvironmentProvider
impl UnwindSafe for TestEnvironmentProvider
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