You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<preclass='rust const'>pub const SERVER_ADDRESS: &'static <aclass="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><code> = </code><code>"127.0.0.1:1234"</code></pre><divclass='docblock'><p>Points to the address the mock server is running at.
53
53
Can be used with <code>std::net::TcpStream</code>.</p>
<preclass='rust const'>pub const SERVER_URL: &'static <aclass="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><code> = </code><code>"http://127.0.0.1:1234"</code></pre><divclass='docblock'><p>Points to the URL the mock server is running at.</p>
}</pre><divclass='docblock'><p>Allows matching headers in multiple ways: matching the exact field name and value, matching only by field name
57
-
or matching that the field name is not present at all.</p>
57
+
}</pre><divclass='docblock'><p>Allows matching the request path or headers in multiple ways: matching the exact value, matching any value (as
58
+
long as it is present), matching by regular expression or checking that a particular header is missing.</p>
58
59
59
-
<p>These matchers are used within the <code>Mock::match_header</code>call.</p>
60
+
<p>These matchers are used within the <code>mock</code> and <code>Mock::match_header</code>calls.</p>
60
61
</div><h2class='variants'>Variants</h2>
61
-
<spanid='variant.Exact' class='variant'><spanid='Exact.v' class='invisible'><code>Exact(<aclass="struct" href="https://doc.rust-lang.org/nightly/collections/string/struct.String.html" title="struct collections::string::String">String</a>)</code></span></span><divclass='docblock'><p>Given the header field, matches the exact header value. There's also an implementation of <code>From<&str></code>
62
+
<spanid='variant.Exact' class='variant'><spanid='Exact.v' class='invisible'><code>Exact(<aclass="struct" href="https://doc.rust-lang.org/nightly/collections/string/struct.String.html" title="struct collections::string::String">String</a>)</code></span></span><divclass='docblock'><p>Matches the exact path or header value. There's also an implementation of <code>From<&str></code>
62
63
to keep things simple and backwards compatible.</p>
63
-
</div><spanid='variant.Any' class='variant'><spanid='Any.v' class='invisible'><code>Any</code></span></span><divclass='docblock'><p>Given the header field, matches any header value.</p>
64
-
</div><spanid='variant.Missing' class='variant'><spanid='Missing.v' class='invisible'><code>Missing</code></span></span><divclass='docblock'><p>Matches when the header field is <em>not</em> be present in the request.</p>
</div><spanid='variant.Regex' class='variant'><spanid='Regex.v' class='invisible'><code>Regex(<aclass="struct" href="https://doc.rust-lang.org/nightly/collections/string/struct.String.html" title="struct collections::string::String">String</a>)</code></span></span><divclass='docblock'><p>Matches a path or header value by a regular expression.</p>
65
+
</div><spanid='variant.Any' class='variant'><spanid='Any.v' class='invisible'><code>Any</code></span></span><divclass='docblock'><p>Matches any path or any header value.</p>
66
+
</div><spanid='variant.Missing' class='variant'><spanid='Missing.v' class='invisible'><code>Missing</code></span></span><divclass='docblock'><p>Checks that a header is not present in the request.</p>
<divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
<divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
79
81
</div><h4id='method.ne-1' class="method"><spanid='ne.v-1' class='invisible'><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <aclass="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><divclass='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
0 commit comments