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"))]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
pub fn new_redirect<'a>(
|
pub fn new_redirect<'a>(location: &'a str) -> RedirectBuilder<'a> {
|
||||||
location: &'a str,
|
|
||||||
tag_list: Option<&'a TagList>,
|
|
||||||
entry_struct: Option<Structure>,
|
|
||||||
) -> RedirectBuilder<'a> {
|
|
||||||
assert_initialized_main_thread!();
|
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"))]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
impl<'a> RedirectBuilder<'a> {
|
impl<'a> RedirectBuilder<'a> {
|
||||||
fn new(
|
fn new(location: &'a str) -> Self {
|
||||||
location: &'a str,
|
|
||||||
tag_list: Option<&'a TagList>,
|
|
||||||
entry_struct: Option<Structure>,
|
|
||||||
) -> Self {
|
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
Self {
|
Self {
|
||||||
src: None,
|
src: None,
|
||||||
seqnum: None,
|
seqnum: None,
|
||||||
other_fields: Vec::new(),
|
other_fields: Vec::new(),
|
||||||
location: location,
|
location: location,
|
||||||
tag_list: tag_list,
|
tag_list: None,
|
||||||
entry_struct: entry_struct,
|
entry_struct: None,
|
||||||
entries: 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(
|
pub fn entries(
|
||||||
self,
|
self,
|
||||||
entries: &'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)],
|
entries: &'a [(&'a str, Option<&'a TagList>, Option<&'a Structure>)],
|
||||||
|
|
Loading…
Reference in a new issue