1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

add FramedRequest helper methods

This commit is contained in:
Nikolay Kim
2019-04-10 19:57:34 -07:00
parent 12e1dad42e
commit e55be4dba6
3 changed files with 147 additions and 12 deletions

View File

@ -205,6 +205,11 @@ impl TestBuffer {
}
}
/// Create new empty TestBuffer instance
pub fn empty() -> TestBuffer {
TestBuffer::new("")
}
/// Add extra data to read buffer.
pub fn extend_read_buf<T: AsRef<[u8]>>(&mut self, data: T) {
self.read_buf.extend_from_slice(data.as_ref())