add a little documentation re: soft buffer limits

This commit is contained in:
Tangent 2018-04-16 01:58:28 -04:00
parent 32cf6dd2ef
commit 0e370556a2
3 changed files with 10 additions and 4 deletions

View file

@ -15,7 +15,10 @@ pub struct EbmlStreamingParser<S> {
}
impl<S> EbmlStreamingParser<S> {
pub fn with_buffer_limit(mut self, limit: usize) -> Self {
/// add a "soft" buffer size limit; if the input buffer exceeds this size,
/// error the stream instead of resuming. It's still possible for the buffer
/// to exceed this size *after* a fill, so ensure input sizes are reasonable.
pub fn with_soft_limit(mut self, limit: usize) -> Self {
self.buffer_size_limit = Some(limit);
self
}