annotate rust/src/paramwaiter.rs @ 614:e1bab5b36352 rust

using some refcells for the paramwaiter
author Matt Johnston <matt@ucc.asn.au>
date Tue, 07 Mar 2017 23:04:02 +0800
parents 5c2b0d47bb83
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 extern crate tokio_core;
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 extern crate futures;
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 extern crate rand;
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
4 extern crate serde_json;
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 use std::time::Duration;
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 use std::io;
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
8 use std::str;
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
9 use std::rc::Rc;
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
10 use std::sync::{Arc,Mutex};
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
11 use std::error::Error;
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
12 use std::cell::{Cell,RefCell};
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 use tokio_core::reactor::Interval;
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 use tokio_core::reactor::Handle;
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
16 use tokio_curl::Session;
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
17 use futures::{Stream,Future,future};
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
18 use curl::easy::Easy;
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
19 use curl::easy;
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
20
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
21 use types::*;
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
22 use ::Config;
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23
613
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
24 #[derive(Deserialize, Debug)]
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
25 struct Response {
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
26 epoch_tag: String,
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
27 params: Params,
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
28 }
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
29
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
30 #[derive(Clone)]
593
bf138339d20a fiddling with timeouts and closures
Matt Johnston <matt@ucc.asn.au>
parents: 592
diff changeset
31 pub struct ParamWaiter {
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
32 limitlog: NotTooOften,
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
33 epoch_tag: RefCell<String>,
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
34 session: RefCell<Option<Session>>,
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
35
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
36 config: Config,
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
37 handle: Handle,
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38 }
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
40 const LOG_MINUTES: u64 = 15;
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
41 const MAX_RESPONSE_SIZE: usize = 10000;
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
42 const TIMEOUT_MINUTES: u64 = 5;
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
43
593
bf138339d20a fiddling with timeouts and closures
Matt Johnston <matt@ucc.asn.au>
parents: 592
diff changeset
44 impl ParamWaiter {
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
45 fn make_request(&self) -> Easy {
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
46 let mut req = Easy::new();
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
47 req.get(true).unwrap();
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
48 // supposedly req.url won't fail, checking is later?
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
49 req.url(&self.config.SETTINGS_URL).unwrap();
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
50
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
51 req.timeout(Duration::new(TIMEOUT_MINUTES * 60, 0)).unwrap();
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
52
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
53 // http header
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
54 // etag: epoch-tag
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
55 let e = self.epoch_tag.borrow();
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
56 if !e.is_empty() {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
57 let mut list = easy::List::new();
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
58 let hd = format!("etag: {}", *e);
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
59 list.append(&hd).unwrap();
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
60 req.http_headers(list).unwrap();
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
61 }
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
62
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
63 req
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
64 }
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
65
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
66 fn handle_response(&self, req: &mut Easy, buf: &Vec<u8>) -> Result<Option<Params>, TemplogError> {
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
67 let text = String::from_utf8_lossy(buf).to_string();
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
68 let resp = req.response_code()?;
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
69 match resp {
613
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
70 200 => {
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
71 // new params
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
72 let r: Response = serde_json::from_str(&text)?;
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
73 *self.epoch_tag.borrow_mut() = r.epoch_tag;
613
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
74 Ok(Some(r.params))
5c2b0d47bb83 Response has epoch_tag and params
Matt Johnston <matt@ucc.asn.au>
parents: 611
diff changeset
75 }
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
76 304 => Ok(None), // unmodified (long polling timeout at the server)
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
77 _ => {
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
78 Err(TemplogError::new(&format!("Wrong server response code {}: {}", resp, text)))
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
79 },
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
80 }
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
81 }
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
82
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
83 fn step(rself: Rc<Self>) -> Box<Future<Item=Option<Params>, Error=TemplogError>> {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
84
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
85 if rself.session.borrow().is_none() {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
86 *rself.session.borrow_mut() = Some(Session::new(rself.handle.clone()));
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
87 }
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
88 let ses = rself.session.borrow().clone().unwrap();
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
89
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
90 let mut req = rself.make_request();
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
91 let buf = Arc::new(Mutex::new(Vec::new()));
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
92
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
93 let dst = buf.clone();
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
94 req.write_function(move |data| {
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
95 let mut dst = dst.lock().unwrap();
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
96 dst.extend_from_slice(data);
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
97 if dst.len() > MAX_RESPONSE_SIZE {
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
98 debug!("Too large params response from server: {}", dst.len());
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
99 Ok(0)
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
100 } else {
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
101 Ok(data.len())
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
102 }
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
103 }).unwrap();
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
104
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
105 let s = ses.perform(req)
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
106 .map_err(|e| TemplogError::new_io("tokio curl error", e.into_error()))
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
107 .and_then(move |mut rq| {
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
108 let result = buf.lock().unwrap();
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
109 rself.handle_response(&mut rq, &result)
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
110 });
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
111 Box::new(s)
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
112
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
113 /*
593
bf138339d20a fiddling with timeouts and closures
Matt Johnston <matt@ucc.asn.au>
parents: 592
diff changeset
114 let mut p = Params::defaults();
bf138339d20a fiddling with timeouts and closures
Matt Johnston <matt@ucc.asn.au>
parents: 592
diff changeset
115 p.fridge_setpoint = 17.0 + 4.0*rand::random::<f32>();
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
116 future::ok(Some(p)).boxed()
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
117 */
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
118 }
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
119
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
120 pub fn new(config: &Config, handle: &Handle) -> Self {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
121 ParamWaiter {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
122 limitlog: NotTooOften::new(LOG_MINUTES*60),
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
123 epoch_tag: RefCell::new(String::new()),
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
124 session: RefCell::new(None),
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
125 config: config.clone(),
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
126 handle: handle.clone(),
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
127 }
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
128 }
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
129
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
130
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
131 pub fn stream(config: &Config, handle: &Handle) -> Box<Stream<Item=Params, Error=TemplogError>> {
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
132 let rcself = Rc::new(ParamWaiter::new(config, handle));
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
133
594
aff50ee77252 rust working better now with streams and sinks.
Matt Johnston <matt@ucc.asn.au>
parents: 593
diff changeset
134 let dur = Duration::from_millis(4000);
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
135 let i = Interval::new(dur, &rcself.handle).unwrap()
611
f3e39e2107fd still doesn't compile, improvements to TemplogError and tokio curl though
Matt Johnston <matt@ucc.asn.au>
parents: 609
diff changeset
136 .map_err(|e| TemplogError::new_io("interval failed", e))
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
137 .and_then(move |()| {
614
e1bab5b36352 using some refcells for the paramwaiter
Matt Johnston <matt@ucc.asn.au>
parents: 613
diff changeset
138 Self::step(rcself.clone())
609
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
139 })
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
140 // throw away None params
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
141 .filter_map(|p| p);
7bda01659426 not building, paramwaiter work
Matt Johnston <matt@ucc.asn.au>
parents: 594
diff changeset
142 Box::new(i)
592
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
143 }
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
144 }
03b48ec0bb03 fridge, types, configwaiter
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
145