Update docs of OpenOptions::as_flags
This commit is contained in:
parent
7c1e5c1dcd
commit
321b680fe6
2 changed files with 3 additions and 3 deletions
|
@ -346,10 +346,9 @@ pub trait OpenOptionsExt {
|
|||
#[stable(feature = "open_options_ext", since = "1.10.0")]
|
||||
fn custom_flags(&mut self, flags: i32) -> &mut Self;
|
||||
|
||||
/// Get the flags of this OpenOptions as [`libc::c_int`].
|
||||
/// With: [`libc::open`]
|
||||
/// Get the flags as [`libc::c_int`].
|
||||
///
|
||||
/// This method allows the reuse of the OpenOptions as flags argument for [`fs::OpenOptions`].
|
||||
/// This method allows the reuse of the OpenOptions as flags argument for [`libc::open`].
|
||||
///
|
||||
/// [`libc::c_int`]: https://docs.rs/libc/*/libc/type.c_int.html
|
||||
/// [`libc::open`]: https://docs.rs/libc/*/libc/fn.open.html
|
||||
|
|
|
@ -655,6 +655,7 @@ impl OpenOptions {
|
|||
pub fn mode(&mut self, mode: u32) {
|
||||
self.mode = mode as mode_t;
|
||||
}
|
||||
|
||||
pub fn as_flags(&self) -> io::Result<c_int> {
|
||||
let access_mode = self.get_access_mode()?;
|
||||
let creation_mode = self.get_creation_mode()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue