pub struct Endpoint { /* private fields */ }Expand description
Both ends of one side: what Streams::create and Streams::open
return. Reads and writes go through it directly, or Endpoint::split
gives the halves to two tasks.
Implementations§
Source§impl Endpoint
impl Endpoint
pub fn id(&self) -> StreamId
pub fn side(&self) -> Side
pub fn split(self) -> (ReadHalf, WriteHalf)
pub fn try_read(&self, buf: &mut [u8]) -> Result<usize>
pub fn try_read_exact(&self, buf: &mut [u8]) -> Result<()>
pub fn blocking_read(&self, buf: &mut [u8]) -> Result<usize>
pub fn blocking_read_chunk(&self, max: usize) -> Result<Bytes>
pub fn try_write(&self, buf: &[u8]) -> Result<usize>
pub fn try_write_exact(&self, buf: &[u8]) -> Result<()>
pub fn blocking_write(&self, buf: &[u8]) -> Result<usize>
pub fn blocking_write_all(&self, buf: &[u8]) -> Result<()>
pub fn finish(&mut self) -> Result<()>
pub fn reset(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for Endpoint
impl !UnwindSafe for Endpoint
impl Freeze for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
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