pub struct Notifier(/* private fields */);Expand description
A handle by which the application can send notifications to the server
Implementations§
Source§impl Notifier
impl Notifier
Sourcepub fn poll(&self, kh: PollHandle) -> Result<()>
pub fn poll(&self, kh: PollHandle) -> Result<()>
Notify poll clients of I/O readiness
§Errors
Returns an error if the kernel rejects the notification.
Sourcepub fn inval_entry(&self, parent: INodeNo, name: &OsStr) -> Result<()>
pub fn inval_entry(&self, parent: INodeNo, name: &OsStr) -> Result<()>
Invalidate the kernel cache for a given directory entry
§Errors
Returns an error if the notification data is too large. Returns an error if the kernel rejects the notification.
Sourcepub fn inval_inode(&self, ino: INodeNo, offset: i64, len: i64) -> Result<()>
pub fn inval_inode(&self, ino: INodeNo, offset: i64, len: i64) -> Result<()>
Invalidate the kernel cache for a given inode (metadata and data in the given range)
§Errors
Returns an error if the kernel rejects the notification.
Sourcepub fn store(&self, ino: INodeNo, offset: u64, data: &[u8]) -> Result<()>
pub fn store(&self, ino: INodeNo, offset: u64, data: &[u8]) -> Result<()>
Update the kernel’s cached copy of a given inode’s data
§Errors
Returns an error if the notification data is too large. Returns an error if the kernel rejects the notification.
Sourcepub fn delete(
&self,
parent: INodeNo,
child: INodeNo,
name: &OsStr,
) -> Result<()>
pub fn delete( &self, parent: INodeNo, child: INodeNo, name: &OsStr, ) -> Result<()>
Invalidate the kernel cache for a given directory entry and inform inotify watchers of a file deletion.
§Errors
Returns an error if the notification data is too large. Returns an error if the kernel rejects the notification.