Struct DomainSocketListener

Source
pub struct DomainSocketListener { /* private fields */ }
Expand description

Unix Domain Socket IPC manager

Listener implementation for Unix sockets as the underlying IPC mechanism.

Holds references to a UnixListener.

Implementations§

Source§

impl DomainSocketListener

Source

pub fn new(timeout: Duration, socket_path: PathBuf) -> Result<Self>

Initialise the connection to the Unix socket.

Trait Implementations§

Source§

impl Debug for DomainSocketListener

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Listen for DomainSocketListener

Source§

fn set_timeout(&mut self, duration: Duration)

Set the timeout on read and write calls on any stream returned by this listener.
Source§

fn accept(&self) -> Option<Connection>

Non-blocking call that gets the next client connection and returns a stream (a Read and Write trait object). Requests are read from the stream and responses are written to it. Streams returned by this method should have a timeout period as set by the set_timeout method. If no connections are present, return None. If there are any errors in establishing the connection other than the missing initialization, the implementation should log them and return None. Send is needed because the stream is moved to a thread. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Free for T

Source§

unsafe fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V