pub struct ActionParameterBuilder<'a> { /* private fields */ }
Implementations§
source§impl<'a> ActionParameterBuilder<'a>
impl<'a> ActionParameterBuilder<'a>
pub fn new(name: &'a str, description: &'a str) -> Self
sourcepub fn add_possible_variable(self, possible_variable: &str) -> Self
pub fn add_possible_variable(self, possible_variable: &str) -> Self
The name of the variables that can be used to compute the value of the parameter. For example for the start value of a seek action, we will accept to take ‘duration’ which will be replace by the total duration of the stream on which the action is executed.
pub fn add_possible_variable_if( self, possible_variable: &str, predicate: bool, ) -> Self
pub fn add_possible_variable_if_some( self, possible_variable: Option<&str>, ) -> Self
pub fn mandatory(self) -> Self
pub fn default_value(self, default_value: &'a str) -> Self
pub fn default_value_if(self, default_value: &'a str, predicate: bool) -> Self
pub fn default_value_if_some(self, default_value: Option<&'a str>) -> Self
sourcepub fn add_type(self, types: &str) -> Self
pub fn add_type(self, types: &str) -> Self
The types the parameter can take described as a string.
NOTE: The types should end with (GstClockTime)
if
its final type is a GstClockTime, this way it will be processed when
preparing the actions.
pub fn add_type_if(self, types: &str, predicate: bool) -> Self
pub fn add_type_if_some(self, types: Option<&str>) -> Self
pub fn build(self) -> ActionParameter
Auto Trait Implementations§
impl<'a> Freeze for ActionParameterBuilder<'a>
impl<'a> RefUnwindSafe for ActionParameterBuilder<'a>
impl<'a> Send for ActionParameterBuilder<'a>
impl<'a> Sync for ActionParameterBuilder<'a>
impl<'a> Unpin for ActionParameterBuilder<'a>
impl<'a> UnwindSafe for ActionParameterBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more