//! Base model
usesuper::XRPLModelResult;/// A trait that implements basic functions to every model.
pubtraitModel{/// Collects a models errors and returns the first error that occurs.
fnget_errors(&self)->XRPLModelResult<()>{Ok(())}/// Simply forwards the error from `get_errors` if there was one.
fnvalidate(&self)->XRPLModelResult<()>{self.get_errors()}/// Checks if the model is valid.
fnis_valid(&self)->bool{self.validate().is_ok()}}