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 diagnostics(&self, diagnostics: Diagnostics) -> Result<()>
[src]
Add the given diagnostics to this context.
pub fn items(&self) -> Result<Ref<Vec<ContextItem>>, BorrowError>
[src]
Iterate over all reporter items.
pub fn has_diagnostics(&self) -> Result<bool>
[src]
Check if reporter is empty.
pub fn clear(&self) -> Result<()>
[src]
Clear the context of any items.