pub struct DeserializeEnv<L: Language> { /* private fields */ }Expand description
A struct to store information to deserialize rules.
Implementations§
Source§impl<L: Language> DeserializeEnv<L>
impl<L: Language> DeserializeEnv<L>
pub fn new(lang: L) -> Self
Sourcepub fn with_utils(
self,
utils: &RapidMap<String, SerializableRule>,
) -> Result<Self, RuleSerializeError>
pub fn with_utils( self, utils: &RapidMap<String, SerializableRule>, ) -> Result<Self, RuleSerializeError>
register utils rule in the DeserializeEnv for later usage.
N.B. This function will manage the util registration order
by their dependency. potential_kinds need ordered insertion.
Sourcepub fn parse_global_utils(
utils: Vec<SerializableGlobalRule<L>>,
) -> Result<GlobalRules, RuleCoreError>
pub fn parse_global_utils( utils: Vec<SerializableGlobalRule<L>>, ) -> Result<GlobalRules, RuleCoreError>
register global utils rule discovered in the config.
pub fn deserialize_rule( &self, serialized: SerializableRule, ) -> Result<Rule, RuleSerializeError>
pub fn with_globals(self, globals: &GlobalRules) -> Self
Trait Implementations§
Source§impl<L: Clone + Language> Clone for DeserializeEnv<L>
impl<L: Clone + Language> Clone for DeserializeEnv<L>
Source§fn clone(&self) -> DeserializeEnv<L>
fn clone(&self) -> DeserializeEnv<L>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<L> Freeze for DeserializeEnv<L>where
L: Freeze,
impl<L> RefUnwindSafe for DeserializeEnv<L>where
L: RefUnwindSafe,
impl<L> Send for DeserializeEnv<L>
impl<L> Sync for DeserializeEnv<L>
impl<L> Unpin for DeserializeEnv<L>where
L: Unpin,
impl<L> UnsafeUnpin for DeserializeEnv<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for DeserializeEnv<L>where
L: UnwindSafe,
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