Trait barter_integration::socket::Transformer
source · [−]pub trait Transformer<Output> {
type Input: DeserializeOwned;
type OutputIter: IntoIterator<Item = Result<Output, SocketError>>;
fn transform(&mut self, input: Self::Input) -> Self::OutputIter;
}Expand description
ProtocolParsers are capable of parsing the input messages from a given protocol (eg WebSocket,
Financial Information eXchange, etc) and deserialising into an Output.
Transformers are capable of transforming any Input into an iterator of
Result<Output, SocketErrors.