pub struct ValidationErrors(/* private fields */);
Expand description
Used to collect errors on the go.
Implementations§
Source§impl ValidationErrors
impl ValidationErrors
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn push_errors(&mut self, error: ValidationError)
pub fn push_config_semantics_error(&mut self, error_message: String)
pub fn push_config_file_error(&mut self, error_message: String)
pub fn push_genesis_semantics_error(&mut self, error_message: String)
pub fn push_genesis_file_error(&mut self, error_message: String)
pub fn push_node_key_file_error(&mut self, error_message: String)
pub fn push_validator_key_file_error(&mut self, error_message: String)
pub fn push_cross_file_semantics_error(&mut self, error_message: String)
Sourcepub fn generate_error_message_per_type(&self) -> Option<String>
pub fn generate_error_message_per_type(&self) -> Option<String>
concatenate all errors of a certain type in one error message to be used for error types that tend to appear in multiples, e.g. ConfigSemanticsError and GenesisSemanticsError
Sourcepub fn return_ok_or_error(&self) -> Result<()>
pub fn return_ok_or_error(&self) -> Result<()>
only call this function when you want the program to return () or all errors so far should only be used when you finished inserting all errors
Auto Trait Implementations§
impl Freeze for ValidationErrors
impl RefUnwindSafe for ValidationErrors
impl Send for ValidationErrors
impl Sync for ValidationErrors
impl Unpin for ValidationErrors
impl UnwindSafe for ValidationErrors
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more