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>
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)
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> Freeze for BufferedSocket<S>where
S: Freeze,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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