pub struct BorrowedWriteHalf<'s> { /* private fields */ }Expand description
Write half of a TCP/Unix stream.
Implementations§
Source§impl<'s> BorrowedWriteHalf<'s>
impl<'s> BorrowedWriteHalf<'s>
Sourcepub async fn writable<S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>(
&self,
ctx: &Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>,
)
pub async fn writable<S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>( &self, ctx: &Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>, )
Waits until the stream is writable.
The stream may still turn out to be not writable, so try_write
can return Errno::AGAIN after it.
§Cancel safety
This method is cancel safe.
Trait Implementations§
Source§impl AsyncWrite for BorrowedWriteHalf<'_>
impl AsyncWrite for BorrowedWriteHalf<'_>
Source§fn write<'a, S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>(
&'a mut self,
ctx: &'a Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>,
buf: &'a [u8],
) -> impl Future<Output = Result<usize>>
fn write<'a, S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>( &'a mut self, ctx: &'a Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>, buf: &'a [u8], ) -> impl Future<Output = Result<usize>>
Writes from a given buffer, returns the number of written bytes. Read more
Auto Trait Implementations§
impl<'s> !RefUnwindSafe for BorrowedWriteHalf<'s>
impl<'s> !Send for BorrowedWriteHalf<'s>
impl<'s> !Sync for BorrowedWriteHalf<'s>
impl<'s> !UnwindSafe for BorrowedWriteHalf<'s>
impl<'s> Forget for BorrowedWriteHalf<'s>
impl<'s> Freeze for BorrowedWriteHalf<'s>
impl<'s> Move for BorrowedWriteHalf<'s>
impl<'s> Unpin for BorrowedWriteHalf<'s>
impl<'s> UnsafeUnpin for BorrowedWriteHalf<'s>
Blanket Implementations§
Source§impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
impl<T> AsyncWriteExt for Twhere
T: AsyncWrite + ?Sized,
Source§fn write_all<'a, S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>(
&'a mut self,
ctx: &'a Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>,
buf: &'a [u8],
) -> impl Future<Output = Result<(), WriteAllError<Self::Error>>>
fn write_all<'a, S: State, const TASKS: usize, const TASK_SIZE: usize, const ROOT_TASK_SIZE: usize, const TIMERS: usize, const FDS: usize>( &'a mut self, ctx: &'a Context<'_, S, TASKS, TASK_SIZE, ROOT_TASK_SIZE, TIMERS, FDS>, buf: &'a [u8], ) -> impl Future<Output = Result<(), WriteAllError<Self::Error>>>
Writes the whole given buffer, calling
AsyncWrite::write until it’s done. Read moreSource§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