MCPcopy Index your code
hub / github.com/SoftbearStudios/bitcode / error

Function error

src/error.rs:11–16  ·  view source on GitHub ↗

Creates an error with a message that might be displayed.

(_msg: &'static str)

Source from the content-addressed store, hash-verified

9
10/// Creates an error with a message that might be displayed.
11pub fn error(_msg: &'static str) -> Error {
12 #[cfg(debug_assertions)]
13 return Error(Cow::Borrowed(_msg));
14 #[cfg(not(debug_assertions))]
15 Error(())
16}
17
18/// Creates an error from a `T:` [`Display`].
19#[cfg(feature = "serde")]

Callers 6

mul_lengthFunction · 0.70
populateMethod · 0.70
errFunction · 0.70
usize_too_bigFunction · 0.70
serialize_enumMethod · 0.50
deserialize_charMethod · 0.50

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected