diff --git a/src/lib.rs b/src/lib.rs index 7d09de3..40769c4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,24 +6,24 @@ pub use cause::*; pub use valid::*; /// Moral equivalent of TryFrom for validation purposes -pub trait ValidateFrom: Sized { +pub trait ValidFrom: Sized { type Error; type Trace; - fn validate_from(a: T) -> Valid; + fn valid_from(a: T) -> Valid; } /// Moral equivalent of TryInto for validation purposes -pub trait ValidateInto { +pub trait ValidInto { type Error; type Trace; - fn validate_into(self) -> Valid; + fn valid_into(self) -> Valid; } /// A blanket implementation for ValidateInto -impl> ValidateInto for S { +impl> ValidInto for S { type Error = T::Error; type Trace = T::Trace; - fn validate_into(self) -> Valid { - T::validate_from(self) + fn valid_into(self) -> Valid { + T::valid_from(self) } }