Struct vrp_pragmatic::format::FormatError
source · [−]pub struct FormatError {
pub code: String,
pub cause: String,
pub action: String,
pub details: Option<String>,
}Expand description
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
sourceimpl FormatError
impl FormatError
sourcepub fn new(code: String, cause: String, action: String) -> Self
pub fn new(code: String, cause: String, action: String) -> Self
Creates a new instance of FormatError action without details.
sourcepub fn new_with_details(
code: String,
cause: String,
action: String,
details: String
) -> Self
pub fn new_with_details(
code: String,
cause: String,
action: String,
details: String
) -> Self
Creates a new instance of FormatError action.
sourcepub fn format_many_to_json(errors: &[Self]) -> String
pub fn format_many_to_json(errors: &[Self]) -> String
Formats multiple format errors into json string.
sourcepub fn format_many(errors: &[Self], separator: &str) -> String
pub fn format_many(errors: &[Self], separator: &str) -> String
Formats multiple format errors into string.
Trait Implementations
sourceimpl Clone for FormatError
impl Clone for FormatError
sourcefn clone(&self) -> FormatError
fn clone(&self) -> FormatError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for FormatError
impl Debug for FormatError
sourceimpl Display for FormatError
impl Display for FormatError
sourceimpl Serialize for FormatError
impl Serialize for FormatError
Auto Trait Implementations
impl RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnwindSafe for FormatError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more