mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-26 19:47:43 +02:00
remove pin-project; update Unpin consrtaint
This commit is contained in:
@ -225,6 +225,15 @@ impl<T, U> Framed<T, U> {
|
||||
self.inner.get_mut().force_send(item)
|
||||
}
|
||||
|
||||
pub fn is_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), U::Error>>
|
||||
where
|
||||
T: AsyncWrite + Unpin,
|
||||
U: Encoder + Unpin,
|
||||
U::Error: From<io::Error>,
|
||||
{
|
||||
Pin::new(&mut self.inner.get_mut()).poll_ready(cx)
|
||||
}
|
||||
|
||||
pub fn next_item(&mut self, cx: &mut Context<'_>) -> Poll<Option<Result<U::Item, U::Error>>>
|
||||
where
|
||||
T: AsyncRead + Unpin,
|
||||
@ -240,6 +249,14 @@ impl<T, U> Framed<T, U> {
|
||||
{
|
||||
Pin::new(self.inner.get_mut()).poll_flush(cx)
|
||||
}
|
||||
|
||||
pub fn close(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), U::Error>>
|
||||
where
|
||||
T: AsyncWrite + Unpin,
|
||||
U: Encoder + Unpin,
|
||||
{
|
||||
Pin::new(&mut self.inner.get_mut()).poll_close(cx)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, U> Stream for Framed<T, U>
|
||||
|
Reference in New Issue
Block a user