Trait system_interface::fs::GetSetFdFlags
source · pub trait GetSetFdFlags {
// Required methods
fn get_fd_flags(&self) -> Result<FdFlags>
where Self: AsFilelike;
fn new_set_fd_flags(&self, flags: FdFlags) -> Result<SetFdFlags<Self>>
where Self: AsFilelike + FromFilelike + Sized;
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<Self>) -> Result<()>
where Self: AsFilelike + Sized;
}
Expand description
Extension trait that can indicate various I/O flags.
Required Methods§
sourcefn get_fd_flags(&self) -> Result<FdFlags>where
Self: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags>where
Self: AsFilelike,
Query the “status” flags for the self
file descriptor.
sourcefn new_set_fd_flags(&self, flags: FdFlags) -> Result<SetFdFlags<Self>>
fn new_set_fd_flags(&self, flags: FdFlags) -> Result<SetFdFlags<Self>>
Create a new SetFdFlags
value for use with set_fd_flags
.
Some platforms lack the ability to dynamically set the flags and
implement set_fd_flags
by closing and re-opening the resource and
splitting it into two steps like this simplifies the lifetimes.
sourcefn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<Self>) -> Result<()>where
Self: AsFilelike + Sized,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<Self>) -> Result<()>where
Self: AsFilelike + Sized,
Set the “status” flags for the self
file descriptor.
This requires a SetFdFlags
obtained from new_set_fd_flags
.
Object Safety§
This trait is not object safe.