pub struct Instances { /* private fields */ }Expand description
One file’s body beside what its parameters stand for: the body is shared, the scope is not. An instance lasts while a root or a reader holds it.
Implementations§
Source§impl Instances
impl Instances
pub fn new(rate: u32) -> Instances
pub fn origin(&self, instance: &str) -> Option<&str>
pub fn deps(&self, path: &str) -> &[String]
pub fn paths(&self) -> impl Iterator<Item = &str>
pub fn holds(&self, path: &str) -> bool
Sourcepub fn instance_of(&self, target: &str) -> Result<String, EngineError>
pub fn instance_of(&self, target: &str) -> Result<String, EngineError>
A bare file name is the file read as a root, on its own terms; a call site’s instance carries the bindings that made it.
pub fn instances_of<'a>( &'a self, file: &'a str, ) -> impl Iterator<Item = String> + 'a
pub fn at<'a>(&'a self, path: &str) -> Option<(&'a Expr, Cx<'a>)>
pub fn bindings<'a>( &'a self, path: &str, ) -> Option<Vec<(&'a str, &'a Expr, Cx<'a>)>>
Source§impl Instances
impl Instances
Sourcepub fn follow<'a, R>(
&'a self,
e: &'a Expr,
cx: Cx<'a>,
go: impl FnOnce(&'a Expr, Cx<'_>) -> R,
) -> Option<R>
pub fn follow<'a, R>( &'a self, e: &'a Expr, cx: Cx<'a>, go: impl FnOnce(&'a Expr, Cx<'_>) -> R, ) -> Option<R>
A bound name continues in what it stands for; anything else is read where it stands.
pub fn node<'a>(&'a self, e: &'a Expr, cx: Cx<'_>) -> Node<'a>
pub fn reads_self(&self, path: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Instances
impl RefUnwindSafe for Instances
impl Send for Instances
impl Sync for Instances
impl Unpin for Instances
impl UnsafeUnpin for Instances
impl UnwindSafe for Instances
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