pub trait Model {
// Provided methods
fn get_errors(&self) -> XRPLModelResult<()> { ... }
fn validate(&self) -> XRPLModelResult<()> { ... }
fn is_valid(&self) -> bool { ... }
}
Expand description
A trait that implements basic functions to every model.
Provided Methods§
Sourcefn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Collects a models errors and returns the first error that occurs.
Sourcefn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
Simply forwards the error from get_errors
if there was one.