File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,24 +6,24 @@ pub use cause::*;
6
6
pub use valid:: * ;
7
7
8
8
/// Moral equivalent of TryFrom for validation purposes
9
- pub trait ValidateFrom < T > : Sized {
9
+ pub trait ValidFrom < T > : Sized {
10
10
type Error ;
11
11
type Trace ;
12
- fn validate_from ( a : T ) -> Valid < Self , Self :: Error , Self :: Trace > ;
12
+ fn valid_from ( a : T ) -> Valid < Self , Self :: Error , Self :: Trace > ;
13
13
}
14
14
15
15
/// Moral equivalent of TryInto for validation purposes
16
- pub trait ValidateInto < T > {
16
+ pub trait ValidInto < T > {
17
17
type Error ;
18
18
type Trace ;
19
- fn validate_into ( self ) -> Valid < T , Self :: Error , Self :: Trace > ;
19
+ fn valid_into ( self ) -> Valid < T , Self :: Error , Self :: Trace > ;
20
20
}
21
21
22
22
/// A blanket implementation for ValidateInto
23
- impl < S , T : ValidateFrom < S > > ValidateInto < T > for S {
23
+ impl < S , T : ValidFrom < S > > ValidInto < T > for S {
24
24
type Error = T :: Error ;
25
25
type Trace = T :: Trace ;
26
- fn validate_into ( self ) -> Valid < T , Self :: Error , Self :: Trace > {
27
- T :: validate_from ( self )
26
+ fn valid_into ( self ) -> Valid < T , Self :: Error , Self :: Trace > {
27
+ T :: valid_from ( self )
28
28
}
29
29
}
You can’t perform that action at this time.
0 commit comments