Trait crypto_market_stream_ws::Protocol [] [src]

pub trait Protocol {
    type Error: Error;
    fn address() -> &'static str;
fn market() -> Market;
fn parse(msg: &str) -> Result<Option<Message>, Self::Error>;
fn serialize(cmd: Command) -> String; }

WebSocket Stream protocol trait.

Associated Types

Protocol error.

Required Methods

Returns WebSocket stream addrss.

Returns protocol market identifier.

Parses received WebSocket message.

Serializes WebSocket command.

Implementors