Function mocker::mock [−][src]
pub fn mock<T: AsRef<str>, U: Mocker>(text: &T, mocker: &mut U) -> String
Expand description
Function that performs the mocking. It takes in a string type and a mocker by reference. It will return a String with the mocking performed.
Examples
let data = String::from("hello world"); let result = mock(&data, &AlternatingMocker::new()); assert_eq!(String::from("hElLo wOrLd"), result);