Struct UnixStream

Source
pub struct UnixStream(/* private fields */);

Implementations§

Source§

impl UnixStream

Source

pub fn connect(path: &UnixStr) -> Result<Self>

Creates and connects a non-blocking UnixStream at the specified path, blocking during the connection attempt

§Errors

Various OS errors relating to permissions, and missing paths

Source

pub fn try_connect(path: &UnixStr) -> Result<Option<Self>>

Attempts to connect immediately without blocking, returns Some if successful, None otherwise

§Errors

Various OS errors relating to permissions, and missing paths

Trait Implementations§

Source§

impl AsRawFd for UnixStream

Source§

impl Debug for UnixStream

Source§

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

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

impl Read for UnixStream

Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Read into to provided buffer Read more
Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>

Reads to the end of this Reader, Read more
Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize>

Reads to the end of the provided buffer Read more
Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>

Reads exactly enough bytes to fill the buffer Read more
Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Get this reader by mut ref Read more
Source§

impl Write for UnixStream

Source§

fn write(&mut self, buf: &[u8]) -> Result<usize>

Tries to write the contents of the provided buffer into this writer returning how many bytes were written. Read more
Source§

fn flush(&mut self) -> Result<()>

Flushes this Writer Read more
Source§

fn write_all(&mut self, buf: &[u8]) -> Result<()>

Writes the full buffer into this Writer Read more
Source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>

Writes format arguments into this Writer Read more
Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Get this Writer as a mutable reference

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> 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.