pub struct Ipc { /* private fields */ }Expand description
An IPC (Inter-Process Communication) implementation using Unix domain sockets.
This struct represents the IPC transport, which allows communication between processes on the same machine using Unix domain sockets.
§Features
- Asynchronous communication using Tokio’s runtime
- Supports both connection-oriented (stream) and connectionless (datagram) sockets
- Implements standard transport traits for easy integration with other components
Note: This implementation is specific to Unix-like operating systems and is not tested on Windows or other non-Unix platforms.
Implementations§
Trait Implementations§
Source§impl Transport<PathBuf> for Ipc
impl Transport<PathBuf> for Ipc
Source§type Connect = Pin<Box<dyn Future<Output = Result<<Ipc as Transport<PathBuf>>::Io, <Ipc as Transport<PathBuf>>::Error>> + Send>>
type Connect = Pin<Box<dyn Future<Output = Result<<Ipc as Transport<PathBuf>>::Io, <Ipc as Transport<PathBuf>>::Error>> + Send>>
A pending output for an outbound connection, obtained when calling
Transport::connect.Source§type Accept = Pin<Box<dyn Future<Output = Result<<Ipc as Transport<PathBuf>>::Io, <Ipc as Transport<PathBuf>>::Error>> + Send>>
type Accept = Pin<Box<dyn Future<Output = Result<<Ipc as Transport<PathBuf>>::Io, <Ipc as Transport<PathBuf>>::Error>> + Send>>
A pending output for an inbound connection, obtained when calling
Transport::poll_accept.Source§fn local_addr(&self) -> Option<PathBuf>
fn local_addr(&self) -> Option<PathBuf>
Returns the local address this transport is bound to (if it is bound).
Source§fn bind<'life0, 'async_trait>(
&'life0 mut self,
addr: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bind<'life0, 'async_trait>(
&'life0 mut self,
addr: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Binds to the given address.
Source§fn connect(&mut self, addr: PathBuf) -> Self::Connect
fn connect(&mut self, addr: PathBuf) -> Self::Connect
Connects to the given address, returning a future representing a
pending outbound connection.
Source§fn poll_accept(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Accept>
fn poll_accept(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Accept>
Poll for incoming connections. If an inbound connection is received, a future representing
a pending inbound connection is returned. The future will resolve to
Transport::Accept.Source§fn on_control(&mut self, _ctrl: Self::Control)
fn on_control(&mut self, _ctrl: Self::Control)
Applies a control-plane message to the transport. It is expected to update internal state
only and should not perform long-running operations.
Auto Trait Implementations§
impl !Freeze for Ipc
impl RefUnwindSafe for Ipc
impl Send for Ipc
impl Sync for Ipc
impl Unpin for Ipc
impl UnsafeUnpin for Ipc
impl UnwindSafe for Ipc
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