pub struct RuleLoader { /* private fields */ }Expand description
Adapts RuleRoot to the engine’s loader interface.
Debug is hand-written because Arc<dyn Language> is not Debug, and requiring it on
the trait would burden every language implementation for one impl here.
Implementations§
Source§impl RuleLoader
impl RuleLoader
Sourcepub fn new(
root: RuleRoot,
typescript: Arc<dyn Language>,
javascript: Arc<dyn Language>,
) -> Self
pub fn new( root: RuleRoot, typescript: Arc<dyn Language>, javascript: Arc<dyn Language>, ) -> Self
Build a loader for a rules root.
The languages are supplied rather than assumed so this crate does not have to know which grammars exist.
Sourcepub fn loaded(&self) -> LoadedModules
pub fn loaded(&self) -> LoadedModules
A handle on what this loader has read, for hashing the rule graph.
Trait Implementations§
Source§impl Clone for RuleLoader
impl Clone for RuleLoader
Source§fn clone(&self) -> RuleLoader
fn clone(&self) -> RuleLoader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuleLoader
impl Debug for RuleLoader
Auto Trait Implementations§
impl !RefUnwindSafe for RuleLoader
impl !Send for RuleLoader
impl !Sync for RuleLoader
impl !UnwindSafe for RuleLoader
impl Freeze for RuleLoader
impl Unpin for RuleLoader
impl UnsafeUnpin for RuleLoader
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