Skip to main content

WsCodec

Trait WsCodec 

Source
pub trait WsCodec: JsonRpcWsCodec { }
Expand description

Bound on the WebSocket codec generic. With the ws feature it requires JsonRpcWsCodec; otherwise it accepts any clonable type (the codec is unused) so callers can pass JsonCodec unchanged.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: JsonRpcWsCodec> WsCodec for T

Available on crate feature ws only.