Skip to main content

base_scheduler/
allocation_mode.rs

1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4/// How file-space allocation affects the logical file length.
5#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
6pub enum AllocationMode {
7    /// Reserve the range and extend the file to its end if necessary. Existing bytes are preserved and newly exposed bytes read as zero. The file is never shrunk.
8    #[default]
9    Extend,
10    /// Reserve the range without changing the logical file length, including when allocating beyond EOF.
11    KeepSize,
12}