-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util: add more get_{ref,mut,pin_mut}
methods
#3364
Conversation
This commit adds: - `Framed::get_pin_mut` - `FramedRead::get_pin_mut` - `FramedWrite::get_pin_mut` - `StreamReader::get_ref` - `StreamReader::get_mut` - `StreamReader::get_pin_mut`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@@ -93,6 +93,29 @@ where | |||
} | |||
} | |||
|
|||
impl<S, B> StreamReader<S, B> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, StreamReader
can probably provide into_inner
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
- codec: `get_ref()`, `get_mut()`, `get_pin_mut()` and `into_inner()` for `Framed`, `FramedRead`, `FramedWrite`, `StreamReader`, `StreamReader`, `StreamReader` and `StreamReader` (tokio-rs#3364). - codec: `write_buffer()` and `write_buffer_mut()` for `Framed` and `FramedWrite` (tokio-rs#3387).
- codec: `get_ref()`, `get_mut()`, `get_pin_mut()` and `into_inner()` for `Framed`, `FramedRead`, `FramedWrite`, `StreamReader`, `StreamReader`, `StreamReader` and `StreamReader` (tokio-rs#3364). - codec: `write_buffer()` and `write_buffer_mut()` for `Framed` and `FramedWrite` (tokio-rs#3387).
# 0.6.1 (January 10, 2020) ### Added - codec: `get_ref()`, `get_mut()`, `get_pin_mut()` and `into_inner()` for `Framed`, `FramedRead`, `FramedWrite`, `StreamReader`, `StreamReader`, `StreamReader` and `StreamReader` (tokio-rs#3364). - codec: `write_buffer()` and `write_buffer_mut()` for `Framed` and `FramedWrite` (tokio-rs#3387).
Motivation
Many wrapper types under
tokio::io
likeBufReader
haveget_ref
,get_mut
andget_pin_mut
methods and they seem to be good to have fortokio-util
types as well.Solution
This commit adds:
Framed::get_pin_mut
FramedRead::get_pin_mut
FramedWrite::get_pin_mut
StreamReader::get_ref
StreamReader::get_mut
StreamReader::get_pin_mut
StreamReader::into_inner