use crate::backend::c;
use bitflags::bitflags;
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct CreateFlags: u32 {
const CLOEXEC = bitcast!(c::IN_CLOEXEC);
const NONBLOCK = bitcast!(c::IN_NONBLOCK);
const _ = !0;
}
}
bitflags! {
#[repr(transparent)]
#[derive(Default, Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct WatchFlags: u32 {
const ACCESS = c::IN_ACCESS;
const ATTRIB = c::IN_ATTRIB;
const CLOSE_NOWRITE = c::IN_CLOSE_NOWRITE;
const CLOSE_WRITE = c::IN_CLOSE_WRITE;
const CREATE = c::IN_CREATE;
const DELETE = c::IN_DELETE;
const DELETE_SELF = c::IN_DELETE_SELF;
const MODIFY = c::IN_MODIFY;
const MOVE_SELF = c::IN_MOVE_SELF;
const MOVED_FROM = c::IN_MOVED_FROM;
const MOVED_TO = c::IN_MOVED_TO;
const OPEN = c::IN_OPEN;
const CLOSE = c::IN_CLOSE;
const MOVE = c::IN_MOVE;
const ALL_EVENTS = c::IN_ALL_EVENTS;
const DONT_FOLLOW = c::IN_DONT_FOLLOW;
const EXCL_UNLINK = 1;
const MASK_ADD = 1;
const MASK_CREATE = 1;
const ONESHOT = c::IN_ONESHOT;
const ONLYDIR = c::IN_ONLYDIR;
const _ = !0;
}
}
bitflags! {
#[repr(transparent)]
#[derive(Default, Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct ReadFlags: u32 {
const ACCESS = c::IN_ACCESS;
const ATTRIB = c::IN_ATTRIB;
const CLOSE_NOWRITE = c::IN_CLOSE_NOWRITE;
const CLOSE_WRITE = c::IN_CLOSE_WRITE;
const CREATE = c::IN_CREATE;
const DELETE = c::IN_DELETE;
const DELETE_SELF = c::IN_DELETE_SELF;
const MODIFY = c::IN_MODIFY;
const MOVE_SELF = c::IN_MOVE_SELF;
const MOVED_FROM = c::IN_MOVED_FROM;
const MOVED_TO = c::IN_MOVED_TO;
const OPEN = c::IN_OPEN;
const IGNORED = c::IN_IGNORED;
const ISDIR = c::IN_ISDIR;
const QUEUE_OVERFLOW = c::IN_Q_OVERFLOW;
const UNMOUNT = c::IN_UNMOUNT;
const _ = !0;
}
}