Function xpct::have_prefix
source · pub fn have_prefix<'a, Actual>(
prefix: impl Into<Cow<'a, str>>
) -> Matcher<'a, Actual, Actual>where
Actual: Debug + AsRef<str> + 'a,
Expand description
Succeeds when the actual value has the expected prefix.
Examples
use xpct::{expect, have_prefix};
expect!("foobar").to(have_prefix("foo"));