pub enum Separator {
Empty,
Byte(u8),
}
Expand description
Separator for enveloping messages in streaming codecs
Variants§
Empty
No envelope is expected between messages. Decoder will try to figure out message boundaries by accumulating incoming bytes until valid JSON is formed. Encoder will send messages without any boundaries between requests.
Byte(u8)
Byte is used as an sentitel between messages
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Separator
impl RefUnwindSafe for Separator
impl Send for Separator
impl Sync for Separator
impl Unpin for Separator
impl UnwindSafe for Separator
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