Struct wasmrs_frames::PayloadError
source · pub struct PayloadError {
pub code: u32,
pub metadata: Option<Bytes>,
pub msg: String,
}
Expand description
The error type used for all [wasmrs_rx::Mono]/[wasmrs_rx::Flux] payloads.
Fields§
§code: u32
The error code.
metadata: Option<Bytes>
Metadata associated with the error.
msg: String
The error message.
Implementations§
source§impl PayloadError
impl PayloadError
sourcepub fn new(code: u32, msg: impl AsRef<str>, metadata: Option<Bytes>) -> Self
pub fn new(code: u32, msg: impl AsRef<str>, metadata: Option<Bytes>) -> Self
Create a new PayloadError with the passed code and message.
sourcepub fn application_error(msg: impl AsRef<str>, metadata: Option<Bytes>) -> Self
pub fn application_error(msg: impl AsRef<str>, metadata: Option<Bytes>) -> Self
Create a new PayloadError with the ErrorCode::ApplicationError code.
Trait Implementations§
source§impl Clone for PayloadError
impl Clone for PayloadError
source§fn clone(&self) -> PayloadError
fn clone(&self) -> PayloadError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PayloadError
impl Debug for PayloadError
source§impl Display for PayloadError
impl Display for PayloadError
source§impl Error for PayloadError
impl Error for PayloadError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()