An example of hand-written coroutines 145 let s = String::from_utf8_lossy(&self. buffer); break Poll State::Ready(s. to_string()); } Ok(n) => { self. buffer. extend(&buff[0..n]); continue; } Err(e) if e. kind() == Error Kind::Would Block => { break Poll State::Not Ready; } Err(e) if e. kind() == Error Kind::Interrupted => { continue; } Err(e) => panic!("{e:?}"), } } } } Okay, so this is where everything happens. The first thing we do is set the associated type called Output to String. The next thing we do is to check whether this is the first time poll was called or not. We do this by checking if self. stream is None. If it's the first time we call poll, we print a message (just so we can see the first time this future was polled), and then we write the GET request to the server. On the first poll, we return Poll State::Not Ready, so Http Get Future will have to be polled at least once more to actually return any results. The next part of the function is trying to read data from our Tcp Stream. We've covered this before, so I'll make this brief, but there are basically five things that can happen: 1. The call successfully returns with 0 bytes read. We've read all the data from the stream and have received the entire GET response. We create a String from the data we've read and wrap it in Poll State::Ready before we return. 2. The call successfully returns with n > 0 bytes read. If that's the case, we read the data into our buffer, append the data into self. buffer, and immediately try to read more data from the stream.