Struct amfnengine::core::list_parameter::ListParameter[]

pub struct ListParameter { /* fields omitted */ }

Implementations

impl ListParameter

List of parameters implementation.

pub fn new() -> ListParameter

Create a new parameter list.

Arguments

  • elem_level_param - Element level

Return

  • See description.

pub fn add_parameter(
    &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 level
  • updating_json_param - Updating from json.

Return

  • See description.

pub fn copy_list_parameter(
    &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>

Get the vector of parameters.

Return

  • See description.

pub fn name(&self) -> &str

Get the name of the parameter.

Return

  • See description.

pub fn param_type(&self) -> TokenType

Get the type of the parameter.

Return

  • See description.

pub fn param_integeri(&self) -> i32

Get the integer value of the parameter.

Return

  • See description.

pub fn param_integer(&self) -> usize

Get the integer value of the parameter.

Return

  • See description.

pub fn param_decimal(&self) -> Decimal

Get the decimal value of the parameter.

Return

  • See description.

pub fn param_string(&self) -> &str

Get the string value of the parameter.

Return

  • See description.

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

Remove the selected parameter from the parameter list.

Return

  • True if successful, otherwise false.

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

Set the string value.

Arguments

  • value_param - See description.

Return

  • True if successful, otherwise false.

Trait Implementations

impl Default for ListParameter

List of parameters default implementation.

fn default() -> Self

Create a new symbol element.

Return

  • See description.

impl ListTrait for ListParameter

List of parameters list implementation.

fn clear(&mut self)

Clear all parameters from the parameter list.

fn count(&self) -> usize

Get the count of the parameter list.

Return

  • See description.

fn index(&self) -> usize

Get the index of the selected parameter (starting from 0).

Return

  • See description.

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

Set the list index.

Arguments

  • index_param - See description.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.