pub fn encode_notification<T: Serialize + ?Sized>( method: &str, params: &T, ) -> Result<Bytes, CodecError>
Encodes a notification.