pub struct Pinned(/* private fields */);Expand description
A process pinned at the other end of a connection. Clones share the one pin.
Implementations§
Source§impl Pinned
impl Pinned
Sourcepub fn of(stream: &Stream) -> Result<Self>
pub fn of(stream: &Stream) -> Result<Self>
The process at the other end of stream, pinned as it is now.
§Errors
The system names no process for the peer, or it ended while it was being pinned.
Sourcepub fn from_pidfd(pidfd: OwnedFd) -> Result<Self>
pub fn from_pidfd(pidfd: OwnedFd) -> Result<Self>
The process pidfd refers to, as a launcher that pinned it hands it over.
§Errors
The process has already ended.
Sourcepub fn pidfd(&self) -> BorrowedFd<'_>
pub fn pidfd(&self) -> BorrowedFd<'_>
The pidfd pinning the process, to hand over to another process.
Sourcepub fn is(&self, pid: u32, start: u64) -> bool
pub fn is(&self, pid: u32, start: u64) -> bool
Whether the process another part of the system names by pid and start (its start
time as this platform counts it: clock ticks since boot on Linux, microseconds since the
epoch on macOS, the creation FILETIME on Windows) is the pinned one, still running.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Pinned
impl Freeze for Pinned
impl Move for Pinned
impl RefUnwindSafe for Pinned
impl Send for Pinned
impl Sync for Pinned
impl Unpin for Pinned
impl UnsafeUnpin for Pinned
impl UnwindSafe for Pinnedwhere
Arc<Pin>: UnwindSafe,
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