pub struct DynProcedure { /* private fields */ }
Expand description
An instance of the dynamically read procedure
Implementations§
Source§impl DynProcedure
impl DynProcedure
pub fn new(p: Arc<Procedure>) -> Self
pub fn get_proc_name(&self) -> &String
Sourcepub fn get_arg_by_label(&self, arg_label: &String) -> Option<&GenericDataTypes>
pub fn get_arg_by_label(&self, arg_label: &String) -> Option<&GenericDataTypes>
Returns the GenericDataTypes type of argument of current instance by its label like:
(arg "l_label" int)
where l_label
is a label name.
§Returns
If item is not found an Option::None is returned, otherwise a reference to GenericDataTypes is returned.
Sourcepub fn get_proc_by_label(
&self,
proc_label: &String,
) -> Option<&Vec<DynProcedure>>
pub fn get_proc_by_label( &self, proc_label: &String, ) -> Option<&Vec<DynProcedure>>
Returns the reference of Vec of DynProcedure if current instance by its label like:
(proc "l_proc_label" '("abc"))
where l_proc_label
is a label name.
§Returns
If item is not found an Option::None is returned, otherwise a reference to Vec of items is returned.
Sourcepub fn resolve_arg_path(
&self,
path: &[String],
) -> DynSchmRes<Option<(&GenericDataTypes, &LexerInfo)>>
pub fn resolve_arg_path( &self, path: &[String], ) -> DynSchmRes<Option<(&GenericDataTypes, &LexerInfo)>>
Used by the serializator.rs
to find in dynamic environment parsed data by
labels (returns arg). Resolves a path into reference to GenericDataTypes.
For args
only!
§Arguments
path
- an array of String whcih holds path formed from labels.
§Returns
A [DynamicSchemeRes] is returned with:
-
Result::Ok with Option where:
Option::Some is returned with reference to GenericDataTypes
Option::None is returnd if procedure is set with flag ProcFlagsFLAG_OPTIONAL
-
Result::Err with error description
Sourcepub fn resolve_arg_lexer_info(
&self,
path: &[String],
) -> DynSchmRes<Option<&LexerInfo>>
pub fn resolve_arg_lexer_info( &self, path: &[String], ) -> DynSchmRes<Option<&LexerInfo>>
As function resolve_arg_path()
, this function is used to
to find in dynamic environment parsed data by labels, but resolves
a path into reference to LexerInfo which holds information about
location of the data in config.
§Arguments
path
- an array of String whcih holds path formed from labels.
§Returns
A [DynamicSchemeRes] is returned with:
-
Result::Ok with Option where:
Option::Some is returned with reference to LexerInfo
Option::None is returnd if procedure is set with flag ProcFlagsFLAG_OPTIONAL
-
Result::Err with error description
Sourcepub fn resolve_proc_path_vec<'r>(
&'r self,
path: &'r [String],
) -> DynSchmRes<Option<(VecResolve<'r>, &'r String)>>
pub fn resolve_proc_path_vec<'r>( &'r self, path: &'r [String], ) -> DynSchmRes<Option<(VecResolve<'r>, &'r String)>>
Used by the serializator.rs
to find in dynamic environment parsed data by
labels. Resolves a path into VecResolve.with lifetime 'r
.
For procs
only!
§Arguments
path
- an array of String whcih holds path formed from labels.
§Returns
A [DynamicSchemeRes] is returned with:
-
Result::Ok with Option where:
Option::Some is returned with reference to VecResolve
Option::None is returnd if procedure is set with flag ProcFlagsFLAG_OPTIONAL
-
Result::Err with error description
Sourcepub fn resolve_proc_path(
&self,
path: &[String],
) -> DynSchmRes<Option<&DynProcedure>>
pub fn resolve_proc_path( &self, path: &[String], ) -> DynSchmRes<Option<&DynProcedure>>
A function which resolves path of labels path
into reference to DynProcedure.
§Arguments
path
- an slice of String which constains a path formed of labels.
§Returns
A [DynamicSchemeRes] is returned with:
-
Result::Ok is returnd with:
Option::Some is returned with reference to DynProcedure
Option::None is returned with nothing if ProcFlags is set withFLAG_OPTIONAL
-
Result::Err is retuened with error description.