mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
Update docs of OpenOptions::as_flags
This commit is contained in:
@@ -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 @@ pub fn custom_flags(&mut self, flags: i32) {
|
||||
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()?;
|
||||
|
||||
Reference in New Issue
Block a user