Struct Procedure

Source
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, li: LexerInfo) -> StaticSchemeRes<Self>

Source

pub fn new_root() -> Self

Source

pub fn is_root(&self) -> bool

Source

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

Source

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

Source

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

Source

pub fn get_name(&self) -> &String

Source

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

Source

pub fn get_args_len(&self) -> usize

Source

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

Source

pub fn get_procs_len(&self) -> usize

Source

pub fn get_proc(&self) -> &LinkedHashMap<Arc<String>, Arc<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<Arc<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:

Source

pub fn validate(&self, li: LexerInfo) -> StaticSchemeRes<()>

Trait Implementations§

Source§

impl Borrow<String> for Procedure

Source§

fn borrow(&self) -> &String

Immutably borrows from an owned value. Read more
Source§

impl Borrow<str> for Procedure

Source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
Source§

impl Clone for Procedure

Source§

fn clone(&self) -> Self

Returns a duplicate 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 Hash for Procedure

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq<str> for Procedure

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Procedure

Source§

fn eq(&self, other: &Procedure) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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
Source§

impl<'nr> StaticProcedureParser<'nr> for Procedure

Source§

type RetType = Procedure

A return type for the parse function.
Source§

type RetTypeArg = ()

An argument for the helper function.
Source§

type RetTypeInt = ()

A return type for the parse_internal function.
Source§

fn parse( si: &'nr SchemeInit<'nr>, nodes: NodesReader<'nr>, ) -> StaticSchemeRes<Self::RetType>

A main entry function. Read more
Source§

fn parse_internal( _si: &'nr SchemeInit<'nr>, _nodes: NodesReader<'nr>, _v: Self::RetTypeArg, ) -> StaticSchemeRes<Self::RetTypeInt>

An additional function for the recursion.
Source§

impl Eq for Procedure

Source§

impl StructuralPartialEq for Procedure

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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,

Source§

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§

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

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

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