Struct bird_protocol_server::read::ReadStreamQueue
source · [−]pub struct ReadStreamQueue<const BUFFER_SIZE: usize> { /* private fields */ }
Implementations
sourceimpl<const BUFFER_SIZE: usize> ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> ReadStreamQueue<BUFFER_SIZE>
pub fn new(read_half: OwnedReadHalf) -> Self
pub fn close(self) -> (OwnedReadHalf, Box<[u8]>)
pub async fn next_packet(&mut self) -> PacketReadableResult<()>
Trait Implementations
sourceimpl<const BUFFER_SIZE: usize> From<OwnedReadHalf> for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> From<OwnedReadHalf> for ReadStreamQueue<BUFFER_SIZE>
sourcefn from(read_half: OwnedReadHalf) -> Self
fn from(read_half: OwnedReadHalf) -> Self
Converts to this type from the input type.
sourceimpl<const BUFFER_SIZE: usize> From<ReadStreamQueue<BUFFER_SIZE>> for OwnedReadHalf
impl<const BUFFER_SIZE: usize> From<ReadStreamQueue<BUFFER_SIZE>> for OwnedReadHalf
sourcefn from(queue: ReadStreamQueue<BUFFER_SIZE>) -> Self
fn from(queue: ReadStreamQueue<BUFFER_SIZE>) -> Self
Converts to this type from the input type.
sourceimpl<const BUFFER_SIZE: usize> InputPacketBytes for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> InputPacketBytes for ReadStreamQueue<BUFFER_SIZE>
fn take_byte<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = InputPacketBytesResult<u8>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn take_slice<'life0, 'life1, 'async_trait>(
&'life0 mut self,
slice: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = InputPacketBytesResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn take_vec<'life0, 'life1, 'async_trait>(
&'life0 mut self,
vec: &'life1 mut Vec<u8>,
count: usize
) -> Pin<Box<dyn Future<Output = InputPacketBytesResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn has_bytes(&self, count: usize) -> bool
fn remaining_bytes(&self) -> usize
Auto Trait Implementations
impl<const BUFFER_SIZE: usize> RefUnwindSafe for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> Send for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> Sync for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> Unpin for ReadStreamQueue<BUFFER_SIZE>
impl<const BUFFER_SIZE: usize> UnwindSafe for ReadStreamQueue<BUFFER_SIZE>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more