stomp_parser
implements a model for STOMP Frames, as spezified in the STOMP Protocol Spezification,Version 1.2.
These frames can be parsed and serialized to and byte arrays.
The types primarily of interest to users of the library are the enums client::ClientFrame
and server::ServerFrame
, which model the frames that can be sent
by STOMP clients and STOMP servers respectively. Obtaining a frame from a message is achieved via try_from
on those types.
Example
use TryFrom;
use ClientFrame;
use HeaderValue;
let message = b"SEND\n\
destination:stairway/to/heaven\n\
\n\
Lorem ipsum dolor sit amet,...\x00"
.to_vec;
if let Ok = try_from else