[−][src]Struct file_descriptors::fanotify::FanotifyFileDescriptor
Represents a fanotify instance.
fanotify requires the CAP_SYS_ADMIN
capability, so is only suitable for priveleged processes or those running as root.
Methods
impl FanotifyFileDescriptor
[src]
pub fn new(
use_precontent_class: bool,
use_content_class: bool,
read_or_write: FanotifyReadOrWrite,
file_status_flags: FileStatusFlags
) -> Result<Self, CreationError>
[src]
use_precontent_class: bool,
use_content_class: bool,
read_or_write: FanotifyReadOrWrite,
file_status_flags: FileStatusFlags
) -> Result<Self, CreationError>
Creates a new instance.
The Notification
class is always enabled.
pub fn add_mark<'a>(
&self,
mark_flags: MarkFlags,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
[src]
&self,
mark_flags: MarkFlags,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
Adds a mark.
pub fn remove_mark<'a>(
&self,
mark_flags: MarkFlags,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
[src]
&self,
mark_flags: MarkFlags,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
Remove a mark.
pub fn remove_all_mount_or_non_mount_marks<'a>(
&self,
remove_mount: bool,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
[src]
&self,
remove_mount: bool,
mark_event_flags: MarkEventFlags,
mark_path: &MarkPath<'a>
) -> Result<(), FanotifyMarkError>
Remove all.
pub fn read(
&self,
read_into: &mut Vec<fanotify_event_metadata>
) -> Result<usize, StructReadError>
[src]
&self,
read_into: &mut Vec<fanotify_event_metadata>
) -> Result<usize, StructReadError>
Reads a fanotify event.
Use this only after a read-ready event notification is received (using edge-triggered events).
Returns the number of items read; adds read items starting at read_into.len()
up to read_into.capacity()
.
pub fn write_permission(
&self,
responses: &[fanotify_response]
) -> Result<usize, StructWriteError>
[src]
&self,
responses: &[fanotify_response]
) -> Result<usize, StructWriteError>
For permission events, the application must write responses.
Returns the number of responses written.
For extremely efficient handling, the responses
slice should be backed by a virtual ring buffer (mirror buffer).
Trait Implementations
impl AsRawFd for FanotifyFileDescriptor
[src]
impl AsRawFdExt for FanotifyFileDescriptor
[src]
fn make_blocking(&self)
[src]
impl Debug for FanotifyFileDescriptor
[src]
impl Drop for FanotifyFileDescriptor
[src]
impl Eq for FanotifyFileDescriptor
[src]
impl FromRawFd for FanotifyFileDescriptor
[src]
unsafe fn from_raw_fd(fd: RawFd) -> Self
[src]
impl Hash for FanotifyFileDescriptor
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IntoRawFd for FanotifyFileDescriptor
[src]
fn into_raw_fd(self) -> RawFd
[src]
impl Ord for FanotifyFileDescriptor
[src]
fn cmp(&self, other: &FanotifyFileDescriptor) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<FanotifyFileDescriptor> for FanotifyFileDescriptor
[src]
fn eq(&self, other: &FanotifyFileDescriptor) -> bool
[src]
fn ne(&self, other: &FanotifyFileDescriptor) -> bool
[src]
impl PartialOrd<FanotifyFileDescriptor> for FanotifyFileDescriptor
[src]
fn partial_cmp(&self, other: &FanotifyFileDescriptor) -> Option<Ordering>
[src]
fn lt(&self, other: &FanotifyFileDescriptor) -> bool
[src]
fn le(&self, other: &FanotifyFileDescriptor) -> bool
[src]
fn gt(&self, other: &FanotifyFileDescriptor) -> bool
[src]
fn ge(&self, other: &FanotifyFileDescriptor) -> bool
[src]
impl StructuralEq for FanotifyFileDescriptor
[src]
impl StructuralPartialEq for FanotifyFileDescriptor
[src]
Auto Trait Implementations
impl RefUnwindSafe for FanotifyFileDescriptor
impl Send for FanotifyFileDescriptor
impl Sync for FanotifyFileDescriptor
impl Unpin for FanotifyFileDescriptor
impl UnwindSafe for FanotifyFileDescriptor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,