Struct InheritableChannel

Source
pub struct InheritableChannel<TX, RX>(/* private fields */);
Expand description

A Channel<TX, RX> whose internal (UNIX domain socket) file descriptor will persist in all child proceses (except for those which explicitly close it), and which only provides conversions to/from file descriptors, and a way to disable inheritance (i.e. re-enabling CLOEXEC semantics on it).

Implementations§

Source§

impl InheritableChannel<Never, (PresentableImageId, OwnedFd)>

Source§

impl<TX, RX> InheritableChannel<TX, RX>

Source

pub fn into_uninheritable(self) -> Result<Channel<TX, RX>, Error>

Disable child process inheritance, i.e. re-add the CLOEXEC flag (via try_clone_to_owned which uses fcntl(F_DUPFD_CLOEXEC)).

Trait Implementations§

Source§

impl<TX, RX> AsFd for InheritableChannel<TX, RX>

Source§

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more
Source§

impl<TX, RX> From<OwnedFd> for InheritableChannel<TX, RX>

Source§

fn from(fd: OwnedFd) -> InheritableChannel<TX, RX>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<TX, RX> Freeze for InheritableChannel<TX, RX>

§

impl<TX, RX> RefUnwindSafe for InheritableChannel<TX, RX>

§

impl<TX, RX> Send for InheritableChannel<TX, RX>

§

impl<TX, RX> Sync for InheritableChannel<TX, RX>

§

impl<TX, RX> Unpin for InheritableChannel<TX, RX>

§

impl<TX, RX> UnwindSafe for InheritableChannel<TX, RX>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.