MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / value_error

Method value_error

src/serde/error.rs:13–15  ·  view source on GitHub ↗

Construct a `ValueError` from a message.

(py: Python, msg: impl ToString)

Source from the content-addressed store, hash-verified

11impl Error {
12 /// Construct a `ValueError` from a message.
13 pub(crate) fn value_error(py: Python, msg: impl ToString) -> Self {
14 PyErr::new::<exc::ValueError, _>(py, msg.to_string()).into()
15 }
16}
17
18impl fmt::Display for Error {

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected