pub struct Context { /* private fields */ }Expand description
A config passed into parsers.
Placeholder for now, but in the future could contain information about the parsing context like the current repository, etc.
Implementations§
Source§impl<'a> Context
impl<'a> Context
pub fn new() -> Self
Sourcepub fn generate_fqn<T>(&self, path: &Path, parts: T) -> Stringwhere
T: IntoIterator<Item = &'a str>,
pub fn generate_fqn<T>(&self, path: &Path, parts: T) -> Stringwhere
T: IntoIterator<Item = &'a str>,
Generates a fully qualified name (FQN) from a path, the current namespace, and a list of parts
For example, a file src/foo/bar.ts and parts of [Interface, methodName]
would yield a FQN of src/foo.bar/ts::Interface::methodName
This function is operating-system independent, and will always use / as
the path separator.
pub fn push_namespace(&mut self, namespace: &str)
pub fn pop_namespace(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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