Trait barter_integration::protocol::StreamParser
source · pub trait StreamParser {
type Stream: Stream;
type Message;
type Error;
// Required method
fn parse<Output>(
input: Result<Self::Message, Self::Error>
) -> Option<Result<Output, SocketError>>
where Output: DeserializeOwned;
}Expand description
StreamParsers are capable of parsing the input messages from a given stream protocol
(eg/ WebSocket, Financial Information eXchange (FIX), etc.) and deserialising into an Output.
Required Associated Types§
Required Methods§
fn parse<Output>(
input: Result<Self::Message, Self::Error>
) -> Option<Result<Output, SocketError>>where
Output: DeserializeOwned,
Object Safety§
This trait is not object safe.