pub struct UnixTransport { /* private fields */ }Expand description
Unix socket transport
Implementations§
Source§impl UnixTransport
impl UnixTransport
Sourcepub fn from_stream(stream: UnixStream) -> Self
pub fn from_stream(stream: UnixStream) -> Self
Create from existing stream
Trait Implementations§
Source§impl Transport for UnixTransport
impl Transport for UnixTransport
Source§fn send(
&self,
data: &[u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn send( &self, data: &[u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
Send a framed message
Source§fn recv(&self) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>
fn recv(&self) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>
Receive a framed message
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if transport is connected
Source§fn local_addr(&self) -> Option<String>
fn local_addr(&self) -> Option<String>
Get local address if available
Auto Trait Implementations§
impl Freeze for UnixTransport
impl !RefUnwindSafe for UnixTransport
impl Send for UnixTransport
impl Sync for UnixTransport
impl Unpin for UnixTransport
impl !UnwindSafe for UnixTransport
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