Struct shm_rs::static_scheme::scheme::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
impl Procedure
pub const ROOT_PROC_NAME: &'static str = "root_procedure_0000"
pub fn new(name: String) -> Self
pub fn new_root() -> Self
pub fn is_root(&self) -> bool
pub fn clone_name(&self) -> Rc<String>
pub fn get_arg_by_label(&self, arg_level: &String) -> Option<&Rc<Argument>>
pub fn get_proc_by_label(&self, proc_name: &String) -> Option<&Rc<ForegnProc>>
pub fn get_name(&self) -> &String
pub fn get_args_iter(&self) -> Iter<'_, Rc<String>, Rc<Argument>>
pub fn get_args_len(&self) -> usize
pub fn get_procs_iter(&self) -> Iter<'_, Rc<String>, Rc<ForegnProc>>
pub fn get_procs_len(&self) -> usize
pub fn get_proc(&self) -> &LinkedHashMap<Rc<String>, Rc<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<Rc<ForegnProc>>
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:
-
Option::Some with Rc to ForegnProc reference clonned instance.
-
Option::None with nothing if not found.
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
Auto Trait Implementations§
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