@@ -101,7 +101,7 @@ pub fn gcoap_put(addr: &str, uri: &str, payload: &[u8]) -> impl Future<Output =
101
101
#[ repr( u8 ) ]
102
102
#[ derive( Debug ) ]
103
103
pub enum Req {
104
- GetBlockwise ( ReqInner ) ,
104
+ BlockwiseGet ( ReqInner ) ,
105
105
Get ( ReqInner ) ,
106
106
Post ( ReqInner ) ,
107
107
Put ( ReqInner ) ,
@@ -122,14 +122,14 @@ impl Req {
122
122
pub fn blockwise_get_new ( addr : & str , uri : & str , blockwise_state_index : usize ) -> Self {
123
123
let inner = ReqInner :: new ( COAP_METHOD_GET , addr, uri, None , true ,
124
124
Some ( blockwise_state_index) , None ) ;
125
- Req :: GetBlockwise ( inner)
125
+ Req :: BlockwiseGet ( inner)
126
126
}
127
127
128
128
pub fn blockwise_get_next ( addr : & str , uri : & str , blockwise_state_index : usize ,
129
129
blockwise_hdr : Vec < u8 , BLOCKWISE_HDR_MAX > ) -> Self {
130
130
let inner = ReqInner :: new ( COAP_METHOD_GET , addr, uri, None , true ,
131
131
Some ( blockwise_state_index) , Some ( blockwise_hdr) ) ;
132
- Req :: GetBlockwise ( inner)
132
+ Req :: BlockwiseGet ( inner)
133
133
}
134
134
}
135
135
@@ -140,7 +140,7 @@ impl Future for Req {
140
140
// https://internals.rust-lang.org/t/idea-enhance-match-ergonomics-to-match-on-pinned-enums-without-unsafe/9317
141
141
unsafe {
142
142
match Pin :: get_unchecked_mut ( self ) {
143
- Req :: GetBlockwise ( req) | Req :: Get ( req) | Req :: Post ( req) | Req :: Put ( req) =>
143
+ Req :: BlockwiseGet ( req) | Req :: Get ( req) | Req :: Post ( req) | Req :: Put ( req) =>
144
144
Pin :: new_unchecked ( req) . poll ( cx) ,
145
145
}
146
146
}
@@ -153,7 +153,7 @@ impl Future for Req {
153
153
pub struct Progress < T > ( Option < AtomicWaker > , pub Option < AtomicWaker > , pub Option < T > ) ;
154
154
155
155
#[ derive( Debug ) ]
156
- pub enum ProgressV2 < T > { // !!!!
156
+ pub enum FutureState < T > { // !!!!
157
157
New ,
158
158
Registered ,
159
159
Resolved ( T ) ,
@@ -210,6 +210,7 @@ pub struct ReqInner {
210
210
blockwise_state_index : Option < usize > ,
211
211
blockwise_hdr : Option < Vec < u8 , BLOCKWISE_HDR_MAX > > ,
212
212
progress : Progress < GcoapMemoState > ,
213
+ // fstat: FutureState<GcoapMemoState>,
213
214
}
214
215
215
216
impl ReqInner {
0 commit comments