#[repr(u32)]pub enum FcntlCmd {
DUPFD = 0,
GETFD = 1,
SETFD = 2,
GETFL = 3,
SETFL = 4,
GETLK = 5,
SETLK = 6,
SETLKW = 7,
DUPFDCLOEXEC = 1_030,
}
Expand description
文件描述符控制命令
MUSL: https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/arch/generic/bits/fcntl.h#L22 TODO: 根据不同的平台实现不同的命令
Variants§
DUPFD = 0
dup
GETFD = 1
get close_on_exec
SETFD = 2
set/clear close_on_exec
GETFL = 3
get file->f_flags
SETFL = 4
set file->f_flags
GETLK = 5
Get record locking info.
SETLK = 6
Set record locking info (non-blocking).
SETLKW = 7
Set record locking info (blocking).
DUPFDCLOEXEC = 1_030
like F_DUPFD, but additionally set the close-on-exec flag
Trait Implementations§
Source§impl TryFrom<u32> for FcntlCmd
impl TryFrom<u32> for FcntlCmd
Source§type Error = TryFromPrimitiveError<FcntlCmd>
type Error = TryFromPrimitiveError<FcntlCmd>
The type returned in the event of a conversion error.
Source§fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
Source§impl TryFromPrimitive for FcntlCmd
impl TryFromPrimitive for FcntlCmd
impl StructuralPartialEq for FcntlCmd
Auto Trait Implementations§
impl Freeze for FcntlCmd
impl RefUnwindSafe for FcntlCmd
impl Send for FcntlCmd
impl Sync for FcntlCmd
impl Unpin for FcntlCmd
impl UnwindSafe for FcntlCmd
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)