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)>
impl InheritableChannel<Never, (PresentableImageId, OwnedFd)>
pub fn extra_args_for_client_spawning(&self) -> [String; 1]
pub fn from_process_args_in_client() -> Result<InheritableChannel<Never, (PresentableImageId, OwnedFd)>, Error>
Source§impl<TX, RX> InheritableChannel<TX, RX>
impl<TX, RX> InheritableChannel<TX, RX>
Sourcepub fn into_uninheritable(self) -> Result<Channel<TX, RX>, Error>
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>
impl<TX, RX> AsFd for InheritableChannel<TX, RX>
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl<TX, RX> From<OwnedFd> for InheritableChannel<TX, RX>
impl<TX, RX> From<OwnedFd> for InheritableChannel<TX, RX>
Source§fn from(fd: OwnedFd) -> InheritableChannel<TX, RX>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more