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

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

A bunch of owned file descriptors.

Required Methods§

source

fn len(&self) -> usize

Returns the number of file descriptors.

source

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.

source

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

Take all the file descriptors out of this object.

Provided Methods§

source

fn is_empty(&self) -> bool

Returns true if there are no file descriptors.

Implementations on Foreign Types§

source§

impl OwnedFds for Vec<OwnedFd>

source§

fn len(&self) -> usize

source§

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

source§

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

Implementors§