cap_primitives/rustix/fs/
open_options_ext.rs

1#[derive(Debug, Clone)]
2pub(crate) struct ImplOpenOptionsExt {
3    pub(crate) mode: u32,
4    pub(crate) custom_flags: i32,
5}
6
7impl ImplOpenOptionsExt {
8    pub(crate) const fn new() -> Self {
9        Self {
10            mode: 0o666,
11            custom_flags: 0,
12        }
13    }
14
15    pub(crate) fn mode(&mut self, mode: u32) -> &mut Self {
16        self.mode = mode;
17        self
18    }
19
20    pub(crate) fn custom_flags(&mut self, flags: i32) -> &mut Self {
21        self.custom_flags = flags;
22        self
23    }
24}