Struct sqlx_core::net::BufferedSocket
source · pub struct BufferedSocket<S> { /* private fields */ }
Implementations§
source§impl<S: Socket> BufferedSocket<S>
impl<S: Socket> BufferedSocket<S>
pub fn new(socket: S) -> Selfwhere S: Sized,
pub async fn read_buffered(&mut self, len: usize) -> Result<BytesMut>
pub fn write_buffer(&self) -> &WriteBuffer
pub fn write_buffer_mut(&mut self) -> &mut WriteBuffer
pub async fn read<'de, T>(&mut self, byte_len: usize) -> Result<T, Error>where T: Decode<'de, ()>,
pub async fn read_with<'de, T, C>( &mut self, byte_len: usize, context: C ) -> Result<T, Error>where T: Decode<'de, C>,
pub fn write<'en, T>(&mut self, value: T)where T: Encode<'en, ()>,
pub fn write_with<'en, T, C>(&mut self, value: T, context: C)where T: Encode<'en, C>,
pub async fn flush(&mut self) -> Result<()>
pub async fn shutdown(&mut self) -> Result<()>
pub fn shrink_buffers(&mut self)
pub fn into_inner(self) -> S
pub fn boxed(self) -> BufferedSocket<Box<dyn Socket>>
Auto Trait Implementations§
impl<S> RefUnwindSafe for BufferedSocket<S>where S: RefUnwindSafe,
impl<S> Send for BufferedSocket<S>where S: Send,
impl<S> Sync for BufferedSocket<S>where S: Sync,
impl<S> Unpin for BufferedSocket<S>where S: Unpin,
impl<S> UnwindSafe for BufferedSocket<S>where S: UnwindSafe,
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