pub struct OvpnCodec { /* private fields */ }Expand description
Tokio codec for the OpenVPN management interface.
The encoder serializes typed OvpnCommand values into correct wire-format
bytes, including proper escaping and multi-line block framing. The decoder
uses command-tracking state to correctly distinguish single-line from
multi-line responses, and accumulates multi-line >CLIENT: notifications
into a single OvpnMessage before emitting them.
Implementations§
Trait Implementations§
Source§impl Decoder for OvpnCodec
impl Decoder for OvpnCodec
Source§type Item = OvpnMessage
type Item = OvpnMessage
The type of decoded frames.
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
Auto Trait Implementations§
impl Freeze for OvpnCodec
impl RefUnwindSafe for OvpnCodec
impl Send for OvpnCodec
impl Sync for OvpnCodec
impl Unpin for OvpnCodec
impl UnsafeUnpin for OvpnCodec
impl UnwindSafe for OvpnCodec
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