Progress towards allowing large writes
This commit is contained in:
@@ -52,9 +52,24 @@ impl<T> Data<T> {
|
||||
&self.data
|
||||
}
|
||||
|
||||
pub fn payload_mut(&mut self) -> &mut T {
|
||||
&mut self.data
|
||||
}
|
||||
|
||||
pub fn into_payload(self) -> T {
|
||||
self.data
|
||||
}
|
||||
|
||||
pub fn map<F, U>(self, f: F) -> Data<U>
|
||||
where F: FnOnce(T) -> U,
|
||||
{
|
||||
Data {
|
||||
stream_id: self.stream_id,
|
||||
data: f(self.data),
|
||||
flags: self.flags,
|
||||
pad_len: self.pad_len,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Buf> Data<T> {
|
||||
|
||||
Reference in New Issue
Block a user