tor-cell: Note an opportunity for future optimization

This commit is contained in:
Nick Mathewson 2023-02-13 14:33:17 -05:00
parent a809a809ba
commit 65cc7d0974
1 changed files with 5 additions and 0 deletions

View File

@ -268,6 +268,11 @@ impl Body for Begin {
#[derive(Debug, Clone)]
pub struct Data {
/// Contents of the cell, to be sent on a specific stream
//
// TODO: There's a good case to be made that this should be a BoxedCellBody
// instead, to avoid allocations and copies. But first probably we should
// figure out how proposal 340 will work with this. Possibly, we will wind
// up using `bytes` or something.
body: Vec<u8>,
}
impl Data {