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§

source

fn get_fd_flags(&self) -> Result<FdFlags>
where Self: AsFilelike,

Query the “status” flags for the self file descriptor.

source

fn new_set_fd_flags(&self, flags: FdFlags) -> Result<SetFdFlags<Self>>
where Self: AsFilelike + FromFilelike + Sized,

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.

source

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.

Implementors§

source§

impl<T> GetSetFdFlags for T