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
impl Procedure
pub const ROOT_PROC_NAME: &'static str = "root_procedure_0000"
pub fn new(name: String, li: LexerInfo) -> StaticSchemeRes<Self>
pub fn new_root() -> Self
pub fn is_root(&self) -> bool
pub fn clone_name(&self) -> Arc<String>
pub fn get_arg_by_label(&self, arg_level: &String) -> Option<&Arc<Argument>>
pub fn get_proc_by_label(&self, proc_name: &String) -> Option<&Arc<ForegnProc>>
pub fn get_name(&self) -> &String
pub fn get_args_iter(&self) -> Iter<'_, Arc<String>, Arc<Argument>>
pub fn get_args_len(&self) -> usize
pub fn get_procs_iter(&self) -> Iter<'_, Arc<String>, Arc<ForegnProc>>
pub fn get_procs_len(&self) -> usize
pub fn get_proc(&self) -> &LinkedHashMap<Arc<String>, Arc<ForegnProc>>
Sourcepub fn add_arg(&mut self, arg: Argument) -> StaticSchemeRes<()>
pub fn add_arg(&mut self, arg: Argument) -> StaticSchemeRes<()>
Adds a procedure’s argument. (arg …)
Sourcepub fn add_proc(
&mut self,
proc_label: String,
proc_names: HashSet<String>,
proc_allowed_flags: ProcFlags,
) -> StaticSchemeRes<()>
pub fn add_proc( &mut self, proc_label: String, proc_names: HashSet<String>, proc_allowed_flags: ProcFlags, ) -> StaticSchemeRes<()>
Sourcepub fn set_empty(&mut self)
pub fn set_empty(&mut self)
Sets the current procedure instance as empty i.e no args or procedures.
Sourcepub fn lookup_procedure(&self, proc_name: &String) -> Option<Arc<ForegnProc>>
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:
-
Option::Some with [Rc] to ForegnProc reference clonned instance.
-
Option::None with nothing if not found.
pub fn validate(&self, li: LexerInfo) -> StaticSchemeRes<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Procedure
impl<'de> Deserialize<'de> for Procedure
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<'nr> StaticProcedureParser<'nr> for Procedure
impl<'nr> StaticProcedureParser<'nr> for Procedure
Source§type RetTypeArg = ()
type RetTypeArg = ()
An argument for the helper function.
Source§type RetTypeInt = ()
type RetTypeInt = ()
A return type for the
parse_internal
function.Source§fn parse(
si: &'nr SchemeInit<'nr>,
nodes: NodesReader<'nr>,
) -> StaticSchemeRes<Self::RetType>
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>
fn parse_internal( _si: &'nr SchemeInit<'nr>, _nodes: NodesReader<'nr>, _v: Self::RetTypeArg, ) -> StaticSchemeRes<Self::RetTypeInt>
An additional function for the recursion.
impl Eq for Procedure
impl StructuralPartialEq for Procedure
Auto Trait Implementations§
impl Freeze for Procedure
impl RefUnwindSafe for Procedure
impl Send for Procedure
impl Sync for Procedure
impl Unpin for Procedure
impl UnwindSafe for Procedure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.