Trait p2panda_rs::Validate
source · pub trait Validate {
type Error: Debug + Error + Send + Sync + 'static;
// Required method
fn validate(&self) -> Result<(), Self::Error>;
}
Expand description
Trait used by p2panda structs to validate data formats.
Use this trait to check against (canonic) formats of data (like document ids or yasmf hashes) coming in via deserialization, constructors or (string) conversion.