pub struct LineRouter { /* private fields */ }Expand description
Line-oriented router for streaming when no exchange is active (route_urc).
Data lines go out byte-for-byte, terminator included; only URC lines are pulled out. An unfinished line is held until the next chunk (or the batch flush), so a URC split across two reads is still recognised and UTF-8 characters are never cut in half.
Implementations§
Source§impl LineRouter
impl LineRouter
pub fn route_streaming( &mut self, chunk: &[u8], solicited_prefixes: &[String], ) -> Vec<RxRouteAction>
Sourcepub fn take_partial(&mut self) -> Vec<u8> ⓘ
pub fn take_partial(&mut self) -> Vec<u8> ⓘ
Unfinished line bytes (handed to the data stream on batch flush).
Trait Implementations§
Source§impl Debug for LineRouter
impl Debug for LineRouter
Auto Trait Implementations§
impl Forget for LineRouter
impl Freeze for LineRouter
impl RefUnwindSafe for LineRouter
impl Send for LineRouter
impl Sync for LineRouter
impl Unpin for LineRouter
impl UnsafeUnpin for LineRouter
impl UnwindSafe for LineRouter
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