[−][src]Struct vsock::VsockStream
A virtio stream between a local and a remote socket.
Methods
impl VsockStream
[src]
pub fn connect(addr: &SockAddr) -> Result<Self>
[src]
Open a connection to a remote host.
pub fn peer_addr(&self) -> Result<SockAddr>
[src]
Virtio socket address of the remote peer associated with this connection.
pub fn local_addr(&self) -> Result<SockAddr>
[src]
Virtio socket address of the local address associated with this connection.
pub fn shutdown(&self, how: Shutdown) -> Result<()>
[src]
Shutdown the read, write, or both halves of this connection.
pub fn try_clone(&self) -> Result<Self>
[src]
Create a new independently owned handle to the underlying socket.
pub fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
Set the timeout on read operations.
pub fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>
[src]
Set the timeout on write operations.
pub fn take_error(&self) -> Result<Option<Error>>
[src]
Retrieve the latest error associated with the underlying socket.
pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
[src]
Move this stream in and out of nonblocking mode.
Trait Implementations
impl Clone for VsockStream
[src]
ⓘImportant traits for VsockStreamfn clone(&self) -> VsockStream
[src]
ⓘImportant traits for VsockStream
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VsockStream
[src]
impl Read for VsockStream
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl Write for VsockStream
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
impl AsRawFd for VsockStream
[src]
impl FromRawFd for VsockStream
[src]
unsafe fn from_raw_fd(socket: RawFd) -> Self
[src]
impl IntoRawFd for VsockStream
[src]
fn into_raw_fd(self) -> RawFd
[src]
Auto Trait Implementations
impl Send for VsockStream
impl Sync for VsockStream
impl Unpin for VsockStream
impl UnwindSafe for VsockStream
impl RefUnwindSafe for VsockStream
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,