Struct vrp_pragmatic::format::FormatError [−][src]
pub struct FormatError {
pub code: String,
pub cause: String,
pub action: String,
pub details: Option<String>,
}A format error.
Fields
code: StringAn error code in registry.
cause: StringA possible error cause.
action: StringAn action to take in order to recover from error.
details: Option<String>A details about exception.
Implementations
impl FormatError[src]
impl FormatError[src]pub fn new(code: String, cause: String, action: String) -> Self[src]
Creates a new instance of FormatError action without details.
pub fn new_with_details(
code: String,
cause: String,
action: String,
details: String
) -> Self[src]
code: String,
cause: String,
action: String,
details: String
) -> Self
Creates a new instance of FormatError action.
pub fn to_json(&self) -> String[src]
Serializes error into json.
pub fn format_many(errors: &[Self], separator: &str) -> String[src]
Formats multiple format errors into string.
Trait Implementations
impl Clone for FormatError[src]
impl Clone for FormatError[src]fn clone(&self) -> FormatError[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Serialize for FormatError[src]
impl Serialize for FormatError[src]Auto Trait Implementations
impl RefUnwindSafe for FormatError
impl RefUnwindSafe for FormatErrorimpl Send for FormatError
impl Send for FormatErrorimpl Sync for FormatError
impl Sync for FormatErrorimpl Unpin for FormatError
impl Unpin for FormatErrorimpl UnwindSafe for FormatError
impl UnwindSafe for FormatError