pub struct Procedure { /* private fields */ }
Expand description

A strucure which holds information about procedure read from init (static scheme) scheme files.

Implementations§

source§

impl Procedure

source

pub const ROOT_PROC_NAME: &'static str = "root_procedure_0000"

source

pub fn new(name: String) -> Self

source

pub fn new_root() -> Self

source

pub fn is_root(&self) -> bool

source

pub fn clone_name(&self) -> Rc<String>

source

pub fn get_arg_by_label(&self, arg_level: &String) -> Option<&Rc<Argument>>

source

pub fn get_proc_by_label(&self, proc_name: &String) -> Option<&Rc<ForegnProc>>

source

pub fn get_name(&self) -> &String

source

pub fn get_args_iter(&self) -> Iter<'_, Rc<String>, Rc<Argument>>

source

pub fn get_args_len(&self) -> usize

source

pub fn get_procs_iter(&self) -> Iter<'_, Rc<String>, Rc<ForegnProc>>

source

pub fn get_procs_len(&self) -> usize

source

pub fn get_proc(&self) -> &LinkedHashMap<Rc<String>, Rc<ForegnProc>>

source

pub fn add_arg(&mut self, arg: Argument) -> StaticSchemeRes<()>

Adds a procedure’s argument. (arg …)

source

pub fn add_proc( &mut self, proc_label: String, proc_names: HashSet<String>, proc_allowed_flags: ProcFlags ) -> StaticSchemeRes<()>

Adds a foreign procedure to current procedure instance.

Arguments
  • proc_label - String a label to the foreign procedure/s

  • proc_names - HashSet String an allowed foreign procedures to appear in current procedure instance.

  • proc_allowed_flags - ProcFlags a control flags like collection, optional

source

pub fn set_empty(&mut self)

Sets the current procedure instance as empty i.e no args or procedures.

source

pub fn is_empty(&self) -> bool

Returns the true if procedure does not have args or procedures

source

pub fn lookup_procedure(&self, proc_name: &String) -> Option<Rc<ForegnProc>>

Searches (by procedure name) for the ForegnProc which has been added previously to current instance.

Arguments
  • proc_name - a name of the foreign process to lookup.
Returns

The Option is returned with:

Trait Implementations§

source§

impl Clone for Procedure

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Procedure

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Procedure

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Procedure

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Serialize for Procedure

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,