MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / code

Method code

src/assert.rs:277–287  ·  view source on GitHub ↗
(self, pred: I)

Source from the content-addressed store, hash-verified

275 ///
276 #[track_caller]
277 pub fn code<I, P>(self, pred: I) -> Self
278 where
279 I: IntoCodePredicate<P>,
280 P: predicates_core::Predicate<i32>,
281 {
282 match self.try_code(pred) {
283 Ok(v) => v,
284 // Called manually so `#[track_caller]` is effective.
285 Err(e) => e.panic(),
286 }
287 }
288
289 /// Variant of [`Assert::code`] that returns an [`AssertResult`].
290 pub fn try_code<I, P>(self, pred: I) -> AssertResult

Callers 7

output_fmtFunction · 0.80
try_successMethod · 0.80
try_interruptedMethod · 0.80
code_implMethod · 0.80
code_exampleFunction · 0.80
lib_exampleFunction · 0.80
mainFunction · 0.80

Calls 2

try_codeMethod · 0.80
panicMethod · 0.80

Tested by 2

code_exampleFunction · 0.64
lib_exampleFunction · 0.64