pub struct VsockStream { /* private fields */ }Expand description
Blocking bidirectional stream over a guest-host virtio-vsock connection.
Implementations§
Source§impl VsockStream
impl VsockStream
Sourcepub fn read_chunk(
&self,
buf: &mut [u8],
deadline: Option<Instant>,
) -> Result<usize>
pub fn read_chunk( &self, buf: &mut [u8], deadline: Option<Instant>, ) -> Result<usize>
Read available bytes (blocking until >= 1 byte, EOF Ok(0), or error).
Sourcepub fn read_exact_deadline(
&self,
buf: &mut [u8],
deadline: Option<Instant>,
) -> Result<()>
pub fn read_exact_deadline( &self, buf: &mut [u8], deadline: Option<Instant>, ) -> Result<()>
Read exact buf.len() bytes.
Sourcepub fn write_all_deadline(
&self,
data: &[u8],
deadline: Option<Instant>,
) -> Result<()>
pub fn write_all_deadline( &self, data: &[u8], deadline: Option<Instant>, ) -> Result<()>
Write all of data respecting peer credit flow control and max_payload.
pub fn shutdown_write(&self)
pub fn close(&self)
pub fn reset(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VsockStream
impl !UnwindSafe for VsockStream
impl Forget for VsockStream
impl Freeze for VsockStreamwhere
*const ArcInner<VsockHost> is !null: Freeze,
PhantomData<ArcInner<VsockHost>>: Freeze,
*const ArcInner<ConnHandle> is !null: Freeze,
PhantomData<ArcInner<ConnHandle>>: Freeze,
impl Move for VsockStream
impl Send for VsockStream
impl Sync for VsockStream
impl Unpin for VsockStream
impl UnsafeUnpin for VsockStreamwhere
*const ArcInner<VsockHost> is !null: UnsafeUnpin,
PhantomData<ArcInner<VsockHost>>: UnsafeUnpin,
*const ArcInner<ConnHandle> is !null: UnsafeUnpin,
PhantomData<ArcInner<ConnHandle>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more