lace_rt/io.rs
1//! lace-rt's process-wide IO settings and budget (see
2//! [`io_budget`](lace_sans_io::runtime_support::io_budget)).
3
4use lace_sans_io::runtime_support::io_budget::IoBudget;
5pub use lace_sans_io::runtime_support::io_budget::IoSettings;
6
7use crate::Result;
8
9pub(crate) static IO: IoBudget = IoBudget::new();
10
11/// Set lace-rt's IO settings for work set up afterwards. Existing
12/// reservations stay until they are returned; a lower budget only refuses
13/// new ones.
14pub fn configure_io(settings: IoSettings) -> Result<()> {
15 IO.configure(settings)
16}