MCPcopy Create free account
hub / github.com/Ember-Moth/ppanel / new_err_code_msg

Method new_err_code_msg

crates/result/src/code_error.rs:34–39  ·  view source on GitHub ↗

Creates a `CodeError` with an explicit code and message. Mirrors Go `xerr.NewErrCodeMsg`.

(err_code: u32, err_msg: impl Into<String>)

Source from the content-addressed store, hash-verified

32 ///
33 /// Mirrors Go `xerr.NewErrCodeMsg`.
34 pub fn new_err_code_msg(err_code: u32, err_msg: impl Into<String>) -> Self {
35 Self {
36 err_code,
37 err_msg: err_msg.into(),
38 }
39 }
40
41 /// Creates a `CodeError` for an unspecified failure (`ERROR` code).
42 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected