Skip to main content

base_scheduler/
file_open.rs

1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4use super::FileOperation;
5use crate::{Cancellation, FileOptions, OperationResult};
6use std::{future::Future, path::Path};
7
8/// Create file resources through the chosen scheduler.
9pub trait FileOpen: FileOperation {
10    fn file_open(
11        &self,
12        path: &Path,
13        options: FileOptions,
14        cancellation: &Cancellation,
15    ) -> impl Future<Output = OperationResult<Self::File>> + Send;
16}