pub unsafe trait SourceSize {
// Provided methods
fn lower_bound(&self) -> u64 { ... }
fn upper_bound(&self) -> Option<u64> { ... }
}
Expand description
A trait which gives known upper and lower bounds of the size of the source.
§Safety
Other functions rely on these bounds being correct. The source must produce at
least the number of bytes returned by lower_bound
, and at most that returned
by upper_bound
.