ListTemplateEvent

Struct ListTemplateEvent 

pub struct ListTemplateEvent { /* private fields */ }

Implementations§

§

impl ListTemplateEvent

Implementation for the list of template event definitions.

pub fn new() -> ListTemplateEvent

Create and return a new list template event elements.

§Return
  • See description.

pub fn add_template_event( &mut self, name_param: &str, initial: bool, list_event: Option<ListEvent>, ) -> bool

Add a new template event into the template event list. If the group and 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 template event.
  • initial - Initial template event.
  • list_event - The list of events (or None).
§Return
  • True if successful, otherwise false.

pub fn copy(&self, updating_json: bool) -> ListTemplateEvent

Performs a deep copy of the template event list and returns a new template event list.

§Arguments
  • updating_json - Updating from Json.
§Return
  • See description.

pub fn name(&self) -> &str

Get the name of the template event.

§Return
  • See description.

pub fn initial_event(&self) -> bool

Get the initial template event.

§Return
  • See description.

pub fn list_event(&self) -> &ListEvent

Get the list of events.

§Return
  • See description.

pub fn list_event_mut(&mut self) -> &mut ListEvent

Get the mut list of events.

§Return
  • See description.

pub fn get_element_by_name(&self, name_param: &str, select_param: bool) -> bool

Select an template event based upon a group and name.

§Arguments
  • name_param - The name of the template event to select.
  • select_param - If true select element, otherwise restore current element.
§Return
  • True if successful, otherwise false.

pub fn remove(&mut self) -> bool

Remove the selected template event from the template event list.

§Return
  • True if successful, otherwise false.

pub fn set_name(&mut self, name_param: &str) -> bool

Set the name of the template event. Duplicate names are not allowed.

§Arguments
  • name_param - See description.
§Return
  • True if successful, otherwise false.

pub fn set_initial_event(&mut self, initial_event_param: bool) -> bool

Set the initial template event.

§Arguments
  • initial_event_param - See description.
§Return
  • True if successful, otherwise false.

pub fn set_sort_on_add(&mut self, sort_on_add_param: bool) -> bool

Determines when the template event list is sorted.

§Arguments
  • sort_on_add_param - If true sort when an template event is added, otherwise do not sort (for bulk adds).
§Return
  • True if successful, otherwise false.

Trait Implementations§

§

impl Default for ListTemplateEvent

List of template events default implementation.

§

fn default() -> Self

Create a new symbol element.

§Return
  • See description.
§

impl ListTrait for ListTemplateEvent

List of template events list implementation.

§

fn clear(&mut self)

Clear all template events from the template event list.

§

fn count(&self) -> usize

Get the count of the template event list.

§Return
  • See description.
§

fn index(&self) -> usize

Get the index of the selected template event (starting from 0).

§Return
  • See description.
§

fn get_element(&self, index_param: usize) -> bool

Select an template event based upon an index value.

§Arguments
  • index_param - The index value of the template event 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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.