stubr 0.6.2

Wiremock implemented in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::wiremock::matchers::{path, PathExactMatcher};
use crate::{StubrError, StubrResult};

use super::HttpUrlStub;

impl TryFrom<&HttpUrlStub> for PathExactMatcher {
    type Error = StubrError;

    fn try_from(http_url: &HttpUrlStub) -> StubrResult<Self> {
        http_url.url_path.as_deref().map(path).ok_or_else(|| StubrError::QuietError)
    }
}