pub struct Bridge { /* private fields */ }Expand description
A listening socket for the length of one run, removed when it goes out of scope.
Implementations§
Source§impl Bridge
impl Bridge
Sourcepub fn bind() -> Result<Self, ToolError>
pub fn bind() -> Result<Self, ToolError>
Bind a socket in a fresh 0700 directory under the system temporary directory.
The directory is per-run and mode 0700: the socket is only as private as the directory
that holds it, and a predictable path in a shared /tmp would let another user connect
and call tools as the agent.
Must be called inside a Tokio runtime: the listener is handed to the reactor here, so that
accept in Self::wait_serving can be one arm of a select!.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Bridge
impl Forget for Bridge
impl Move for Bridge
impl RefUnwindSafe for Bridgewhere
PollEvented<UnixListener>: RefUnwindSafe,
impl Send for Bridge
impl Sync for Bridge
impl Unpin for Bridge
impl UnsafeUnpin for Bridgewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<ScheduledIo> is !null: UnsafeUnpin,
PhantomData<ArcInner<ScheduledIo>>: UnsafeUnpin,
impl UnwindSafe for Bridge
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