[−][src]Struct tendermint_testgen::tester::TestEnv
A test environment, which is essentially a wrapper around some directory, with some utility functions operating relative to that directory.
Implementations
impl TestEnv
[src]
pub fn new(current_dir: &str) -> Option<Self>
[src]
pub fn push(&self, child: &str) -> Option<Self>
[src]
pub fn current_dir(&self) -> &str
[src]
pub fn clear_log(&self) -> Option<()>
[src]
pub fn logln(&self, msg: &str) -> Option<()>
[src]
pub fn logln_to(&self, msg: &str, rel_path: impl AsRef<Path>) -> Option<()>
[src]
pub fn read_file(&self, rel_path: impl AsRef<Path>) -> Option<String>
[src]
Read a file from a path relative to the environment current dir into a string
pub fn write_file(
&self,
rel_path: impl AsRef<Path>,
contents: &str
) -> Option<()>
[src]
&self,
rel_path: impl AsRef<Path>,
contents: &str
) -> Option<()>
Write a file to a path relative to the environment current dir
pub fn parse_file<T: DeserializeOwned>(
&self,
rel_path: impl AsRef<Path>
) -> Option<T>
[src]
&self,
rel_path: impl AsRef<Path>
) -> Option<T>
Parse a file from a path relative to the environment current dir as the given type
pub fn copy_file_from(&self, path: impl AsRef<Path>) -> Option<()>
[src]
Copy a file from the path outside environment into the environment current dir Returns None if copying was not successful
pub fn copy_file_from_as(
&self,
path: impl AsRef<Path>,
new_name: &str
) -> Option<()>
[src]
&self,
path: impl AsRef<Path>,
new_name: &str
) -> Option<()>
Copy a file from the path outside environment into the environment current dir Assigns the file a new_name in the current environment Returns None if copying was not successful
pub fn copy_file_from_env(
&self,
other: &TestEnv,
path: impl AsRef<Path>
) -> Option<()>
[src]
&self,
other: &TestEnv,
path: impl AsRef<Path>
) -> Option<()>
Copy a file from the path relative to the other environment into the environment current dir Returns None if copying was not successful
pub fn copy_file_from_env_as(
&self,
other: &TestEnv,
path: impl AsRef<Path>,
new_name: &str
) -> Option<()>
[src]
&self,
other: &TestEnv,
path: impl AsRef<Path>,
new_name: &str
) -> Option<()>
Copy a file from the path relative to the other environment into the environment current dir Assigns the file a new_name in the current environment Returns None if copying was not successful
pub fn remove_file(&self, rel_path: impl AsRef<Path>) -> Option<()>
[src]
Remove a file from a path relative to the environment current dir
pub fn full_path(&self, rel_path: impl AsRef<Path>) -> PathBuf
[src]
Convert a relative path to the full path from the test root Return None if the full path can't be formed
pub fn rel_path(&self, full_path: impl AsRef<Path>) -> Option<String>
[src]
Convert a full path to the path relative to the test root Returns None if the full path doesn't contain test root as prefix
pub fn full_canonical_path(&self, rel_path: impl AsRef<Path>) -> Option<String>
[src]
Convert a relative path to the full path from the test root, canonicalized Returns None the full path can't be formed
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TestEnv
[src]
impl Send for TestEnv
[src]
impl Sync for TestEnv
[src]
impl Unpin for TestEnv
[src]
impl UnwindSafe for TestEnv
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,