File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl Chunk {
4949 }
5050 }
5151
52- /// TODO
52+ /// Create a new chunk with the given write settings.
5353 pub fn new_with ( write_settings : WriteSettings ) -> Self {
5454 let mut chunk = Self :: new ( ) ;
5555 chunk. write_settings = write_settings;
@@ -64,6 +64,11 @@ impl Chunk {
6464 self . buf . len ( )
6565 }
6666
67+ /// Reserve an additional number of bytes in the buffer.
68+ pub fn reserve ( & mut self , additional : usize ) {
69+ self . buf . reserve ( additional) ;
70+ }
71+
6772 /// The bytes already written so far.
6873 pub fn as_bytes ( & self ) -> & [ u8 ] {
6974 self . buf . as_slice ( )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ impl Content {
1818 Self :: with_capacity ( 1024 )
1919 }
2020
21- /// TODO
21+ /// Create a new content stream with the given write settings.
2222 pub fn new_with ( write_settings : WriteSettings ) -> Self {
2323 let mut content = Self :: new ( ) ;
2424 content. write_settings = write_settings;
You can’t perform that action at this time.
0 commit comments