Struct amfnengine::core::list_parameter::ListParameter [−]
Implementations
impl ListParameter
List of parameters implementation.
pub fn new() -> ListParameter
pub fn add_parameter(
&mut self,
name_param: &str,
updating_json_param: bool
) -> bool
&mut self,
name_param: &str,
updating_json_param: bool
) -> bool
Add a new parameter into the parameter list. If the name results in a duplicate entry, an incrementing number starting from 2 is appended to the name until a non-duplicate entry is found.
Arguments
name_param
- Name of the parameter.elem_level_param
- Element level
Return
- True if successful, otherwise false.
pub fn copy(&self, updating_json_param: bool) -> ListParameter
Performs a deep copy of this parameter list and returns to new parameter list.
Arguments
elem_level_param
- Element levelupdating_json_param
- Updating from json.
Return
- See description.
pub fn copy_list_parameter(
&self,
list_parameter: &mut ListParameter,
updating_json_param: bool
)
&self,
list_parameter: &mut ListParameter,
updating_json_param: bool
)
Performs a deep copy of this parameter list into the parameter list parameter.
Arguments
list_parameter
- The parameter list to copy into.updating_json_param
- Updating from json.
pub fn equal(&self, list_parameter: &ListParameter) -> bool
Tests if this parameter list and another are equal.
Arguments
list_parameter
- List to compare.
Return
- True if equals, otherwise false.
pub fn list(&self) -> &Vec<ElemParameter>
pub fn name(&self) -> &str
pub fn param_type(&self) -> TokenType
pub fn param_integeri(&self) -> i32
pub fn param_integer(&self) -> usize
pub fn param_decimal(&self) -> Decimal
pub fn param_string(&self) -> &str
pub fn get_element_by_name(&self, name_param: &str, select_param: bool) -> bool
Select a parameter based upon a name.
Arguments
name_param
- The name of the parameter to select.select_param
- If true select element, otherwise restore current element.
Return
- True if successful, otherwise false.
pub fn move_param(&mut self, is_up: bool) -> bool
Move the selected parameter up or down in the parameter list.
Arguments
is_up
- Move up, otherwise down.
Return
- True if successful, otherwise false.
pub fn remove(&mut self) -> bool
pub fn set_name(&mut self, name_param: &str) -> bool
Set the name of the parameter. Duplicate names are not allowed.
Arguments
name_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_type(&mut self, value_param: TokenType) -> bool
Set the type of parameter.
Arguments
value_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_integeri(&mut self, value_param: i32) -> bool
Set the integer value.
Arguments
value_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_integer(&mut self, value_param: usize) -> bool
Set the integer value.
Arguments
value_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_decimal(&mut self, value_param: Decimal) -> bool
Set the decimal value.
Arguments
value_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_string(&mut self, value_param: &str) -> bool
Trait Implementations
impl Default for ListParameter
List of parameters default implementation.
impl ListTrait for ListParameter
List of parameters list implementation.
fn clear(&mut self)
Clear all parameters from the parameter list.
fn count(&self) -> usize
fn index(&self) -> usize
fn get_element(&self, index_param: usize) -> bool
Select a parameter based upon an index value.
Arguments
index_param
- Index value of the parameter to select (starting from 0).
Return
- True if successful, otherwise false.
fn set_index(&self, index_param: usize) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for ListParameter
impl Send for ListParameter
impl !Sync for ListParameter
impl Unpin for ListParameter
impl UnwindSafe for ListParameter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,