Trait runa_io::traits::OwnedFds

pub trait OwnedFds: Extend<OwnedFd> {
    // Required methods
    fn len(&self) -> usize;
    fn capacity(&self) -> Option<usize>;
    fn take<T>(&mut self, fds: &mut T)
       where T: Extend<OwnedFd>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

A bunch of owned file descriptors.

Required Methods§

fn len(&self) -> usize

Returns the number of file descriptors.

fn capacity(&self) -> Option<usize>

Returns the maximum number of file descriptors that can be stored. Trying to store more than this number of file descriptors will cause them to be dropped.

Returns None if there is no limit.

fn take<T>(&mut self, fds: &mut T)where T: Extend<OwnedFd>,

Take all the file descriptors out of this object.

Provided Methods§

fn is_empty(&self) -> bool

Returns true if there are no file descriptors.

Implementations on Foreign Types§

§

impl OwnedFds for Vec<OwnedFd, Global>

§

fn len(&self) -> usize

§

fn capacity(&self) -> Option<usize>

§

fn take<T>(&mut self, fds: &mut T)where T: Extend<OwnedFd>,

Implementors§

source§

impl<const N: usize> OwnedFds for OwnedFds<N>