@@ -21,18 +21,18 @@ use crate::HyperlightError::ReturnValueConversionFailure;
21
21
use crate :: { log_then_return, Result } ;
22
22
23
23
/// This is a marker trait that is used to indicate that a type is a valid Hyperlight return type.
24
- pub trait SupportedReturnType < T > {
24
+ pub trait SupportedReturnType : Sized {
25
25
/// Gets the return type of the supported return value
26
26
fn get_hyperlight_type ( ) -> ReturnType ;
27
27
28
28
/// Gets the value of the supported return value
29
29
fn get_hyperlight_value ( & self ) -> ReturnValue ;
30
30
31
31
/// Gets the inner value of the supported return type
32
- fn get_inner ( a : ReturnValue ) -> Result < T > ;
32
+ fn get_inner ( a : ReturnValue ) -> Result < Self > ;
33
33
}
34
34
35
- impl SupportedReturnType < ( ) > for ( ) {
35
+ impl SupportedReturnType for ( ) {
36
36
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
37
37
fn get_hyperlight_type ( ) -> ReturnType {
38
38
ReturnType :: Void
@@ -54,7 +54,7 @@ impl SupportedReturnType<()> for () {
54
54
}
55
55
}
56
56
57
- impl SupportedReturnType < String > for String {
57
+ impl SupportedReturnType for String {
58
58
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
59
59
fn get_hyperlight_type ( ) -> ReturnType {
60
60
ReturnType :: String
@@ -76,7 +76,7 @@ impl SupportedReturnType<String> for String {
76
76
}
77
77
}
78
78
79
- impl SupportedReturnType < i32 > for i32 {
79
+ impl SupportedReturnType for i32 {
80
80
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
81
81
fn get_hyperlight_type ( ) -> ReturnType {
82
82
ReturnType :: Int
@@ -98,7 +98,7 @@ impl SupportedReturnType<i32> for i32 {
98
98
}
99
99
}
100
100
101
- impl SupportedReturnType < u32 > for u32 {
101
+ impl SupportedReturnType for u32 {
102
102
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
103
103
fn get_hyperlight_type ( ) -> ReturnType {
104
104
ReturnType :: UInt
@@ -120,7 +120,7 @@ impl SupportedReturnType<u32> for u32 {
120
120
}
121
121
}
122
122
123
- impl SupportedReturnType < i64 > for i64 {
123
+ impl SupportedReturnType for i64 {
124
124
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
125
125
fn get_hyperlight_type ( ) -> ReturnType {
126
126
ReturnType :: Long
@@ -142,7 +142,7 @@ impl SupportedReturnType<i64> for i64 {
142
142
}
143
143
}
144
144
145
- impl SupportedReturnType < u64 > for u64 {
145
+ impl SupportedReturnType for u64 {
146
146
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
147
147
fn get_hyperlight_type ( ) -> ReturnType {
148
148
ReturnType :: ULong
@@ -164,7 +164,7 @@ impl SupportedReturnType<u64> for u64 {
164
164
}
165
165
}
166
166
167
- impl SupportedReturnType < bool > for bool {
167
+ impl SupportedReturnType for bool {
168
168
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
169
169
fn get_hyperlight_type ( ) -> ReturnType {
170
170
ReturnType :: Bool
@@ -186,7 +186,7 @@ impl SupportedReturnType<bool> for bool {
186
186
}
187
187
}
188
188
189
- impl SupportedReturnType < Vec < u8 > > for Vec < u8 > {
189
+ impl SupportedReturnType for Vec < u8 > {
190
190
#[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
191
191
fn get_hyperlight_type ( ) -> ReturnType {
192
192
ReturnType :: VecBytes
0 commit comments