Instantiate {Event,Message,Query}s from the target type
See initial discussion in #265 (closed)
For Event
s and Message
s, we actually instantiate an Event
and Message
. With the implementation leading to the following usage, clippy
warns that new
should return Self
:
let stream_start_evt = gst::event::StreamStart::new(&stream_id);
In this MR I used new_event
and new_message
for that reason, but I'd rather stick to the original proposal. The way these types are designed is such that we can't get a plain StreamStart
anyway, these types are always manipulated as Event
s or as EventView
s via view
.
Here are the options I can think of:
- Instantiate with
new_event
&new_message
as is. - Instantiate with
new_evt
&new_msg
, same but lighter. - Instantiate with
new
and silenceclippy
.
Fixes #265 (closed)
Edited by François Laignel