pub struct FrontendCodec { /* private fields */ }Expand description
Codec for the client-facing half of a proxied connection.
Implementations§
Source§impl FrontendCodec
impl FrontendCodec
pub fn new() -> Self
Sourcepub fn post_startup() -> Self
pub fn post_startup() -> Self
Creates a codec that skips startup message parsing. Use this for connections that have already completed the startup handshake.
Trait Implementations§
Source§impl Decoder for FrontendCodec
impl Decoder for FrontendCodec
Source§type Item = FrontendMessage
type Item = FrontendMessage
The type of decoded frames.
Source§type Error = ProtocolError
type Error = ProtocolError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl Default for FrontendCodec
impl Default for FrontendCodec
Source§impl Encoder<BackendMessage> for FrontendCodec
impl Encoder<BackendMessage> for FrontendCodec
Auto Trait Implementations§
impl Freeze for FrontendCodec
impl RefUnwindSafe for FrontendCodec
impl Send for FrontendCodec
impl Sync for FrontendCodec
impl Unpin for FrontendCodec
impl UnsafeUnpin for FrontendCodec
impl UnwindSafe for FrontendCodec
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