forked from mirrors/gstreamer-rs
Move optional taglist/entry_struct fields into the Redirect builder from the constructor
This commit is contained in:
parent
7bc1fce97d
commit
974e681a5d
1 changed files with 19 additions and 13 deletions
|
@ -337,13 +337,9 @@ impl GstRc<MessageRef> {
|
|||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn new_redirect<'a>(
|
||||
location: &'a str,
|
||||
tag_list: Option<&'a TagList>,
|
||||
entry_struct: Option<Structure>,
|
||||
) -> RedirectBuilder<'a> {
|
||||
pub fn new_redirect<'a>(location: &'a str) -> RedirectBuilder<'a> {
|
||||
assert_initialized_main_thread!();
|
||||
RedirectBuilder::new(location, tag_list, entry_struct)
|
||||
RedirectBuilder::new(location)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2396,23 +2392,33 @@ pub struct RedirectBuilder<'a> {
|
|||
}
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl<'a> RedirectBuilder<'a> {
|
||||
fn new(
|
||||
location: &'a str,
|
||||
tag_list: Option<&'a TagList>,
|
||||
entry_struct: Option<Structure>,
|
||||
) -> Self {
|
||||
fn new(location: &'a str) -> Self {
|
||||
skip_assert_initialized!();
|
||||
Self {
|
||||
src: None,
|
||||
seqnum: None,
|
||||
other_fields: Vec::new(),
|
||||
location: location,
|
||||
tag_list: tag_list,
|
||||
entry_struct: entry_struct,
|
||||
tag_list: None,
|
||||
entry_struct: None,
|
||||
entries: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn tag_list(self, tag_list: &'a TagList) -> Self {
|
||||
Self {
|
||||
tag_list: Some(tag_list),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn entry_struct(self, entry_struct: Structure) -> Self {
|
||||
Self {
|
||||
entry_struct: Some(entry_struct),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn entries(
|
||||
self,
|
||||
entries: &'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)],
|
||||
|
|
Loading…
Reference in a new issue