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
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.