Struct reproto_core::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
Context for a single reproto run.
Methods
impl Context
[src]
pub fn new(filesystem: Box<Filesystem>) -> Context
[src]
Create a new context with the given filesystem.
pub fn with_items(self, items: Rc<RefCell<Vec<ContextItem>>>) -> Context
[src]
Modify the existing context with a reference to the given errors.
pub fn map_filesystem<F>(self, map: F) -> Self where
F: FnOnce(Rc<Box<Filesystem>>) -> Box<Filesystem>,
[src]
F: FnOnce(Rc<Box<Filesystem>>) -> Box<Filesystem>,
Map the existing filesystem and return a new context with the new filesystem.
pub fn filesystem(&self, root: Option<&Path>) -> Result<Box<Handle>>
[src]
Retrieve the filesystem abstraction.
pub fn report(&self) -> Reporter
[src]
Build a handle that can be used in conjunction with Result#map_err.
pub fn symbol<P: Into<Span>>(
&self,
kind: SymbolKind,
span: P,
name: &RpName
) -> Result<()>
[src]
&self,
kind: SymbolKind,
span: P,
name: &RpName
) -> Result<()>
Register a symbol.
pub fn items(&self) -> Result<Ref<Vec<ContextItem>>, BorrowError>
[src]
Iterate over all reporter items.
pub fn has_errors(&self) -> Result<bool>
[src]
Check if reporter is empty.