pub fn should_stream(
content_dir: &Path,
budget: &MemoryBudget,
explicitly_set: bool,
) -> boolExpand description
Determines whether streaming compilation should be used.
Returns true if the content directory has more files than a single
batch can hold, or if --max-memory was explicitly set.
§Examples
use ssg::streaming::{should_stream, MemoryBudget};
use tempfile::tempdir;
let dir = tempdir().unwrap();
let budget = MemoryBudget::default_budget();
// Explicitly set ⇒ always stream.
assert!(should_stream(dir.path(), &budget, true));