pub enum Inbound<'a> {
NotProtocol,
UnknownPrefix,
MalformedFragment,
Whole(&'a str),
Fragment(Fragment<'a>),
}Expand description
What an inbound transport text is (§5.3).
Variants§
NotProtocol
Does not start with zaun:: not a protocol message. Never parse it as a command; count
it against the command rate limit; on an unbound connection send one plain notice.
UnknownPrefix
Starts with zaun: but the frame prefix is unknown (zaun:2: …): answer
UNSUPPORTED_VERSION when possible, otherwise ignore.
MalformedFragment
zaun:1f: with a malformed header (bad id, leading zeros, index ≥ count, …).
Whole(&'a str)
A whole envelope: its JSON text, to be parsed as an envelope.
Fragment(Fragment<'a>)
A fragment, to be pushed into the connection’s reassembler.
Trait Implementations§
impl<'a> Copy for Inbound<'a>
impl<'a> Eq for Inbound<'a>
impl<'a> StructuralPartialEq for Inbound<'a>
Auto Trait Implementations§
impl<'a> Freeze for Inbound<'a>
impl<'a> RefUnwindSafe for Inbound<'a>
impl<'a> Send for Inbound<'a>
impl<'a> Sync for Inbound<'a>
impl<'a> Unpin for Inbound<'a>
impl<'a> UnsafeUnpin for Inbound<'a>
impl<'a> UnwindSafe for Inbound<'a>
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