pub struct DirectoryCompilerHost { /* private fields */ }Expand description
One directory-backed compiler host that reads source files from filesystem roots and writes outputs back to disk.
Implementations§
Source§impl DirectoryCompilerHost
impl DirectoryCompilerHost
Sourcepub fn new(
resolver: FileSystemScriptResolver,
output_directory: impl Into<PathBuf>,
) -> Self
pub fn new( resolver: FileSystemScriptResolver, output_directory: impl Into<PathBuf>, ) -> Self
Creates one directory host rooted at output_directory.
Sourcepub fn set_graphviz_directory(&mut self, directory: impl Into<PathBuf>)
pub fn set_graphviz_directory(&mut self, directory: impl Into<PathBuf>)
Sets an alternate directory for Graphviz DOT output.
Sourcepub fn set_simulate(&mut self, simulate: bool)
pub fn set_simulate(&mut self, simulate: bool)
Enables or disables simulate mode, which records target paths without writing files.
Sourcepub fn written_paths(&self) -> &[PathBuf]
pub fn written_paths(&self) -> &[PathBuf]
Returns the paths written or scheduled during the most recent compile.
Trait Implementations§
Source§impl Clone for DirectoryCompilerHost
impl Clone for DirectoryCompilerHost
Source§fn clone(&self) -> DirectoryCompilerHost
fn clone(&self) -> DirectoryCompilerHost
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CompilerHost for DirectoryCompilerHost
impl CompilerHost for DirectoryCompilerHost
Source§fn resolve_script_bytes(
&self,
script_name: &str,
res_type: ResType,
) -> Result<Option<Vec<u8>>, SourceError>
fn resolve_script_bytes( &self, script_name: &str, res_type: ResType, ) -> Result<Option<Vec<u8>>, SourceError>
Resolves one logical script name for the requested resource type. Read more
Source§fn write_file(
&mut self,
file_name: &str,
res_type: ResType,
data: &[u8],
_binary: bool,
) -> Result<(), CompilerHostError>
fn write_file( &mut self, file_name: &str, res_type: ResType, data: &[u8], _binary: bool, ) -> Result<(), CompilerHostError>
Receives one emitted compiler artifact. Read more
Source§fn write_graphviz(
&mut self,
file_name: &str,
dot: &str,
) -> Result<(), CompilerHostError>
fn write_graphviz( &mut self, file_name: &str, dot: &str, ) -> Result<(), CompilerHostError>
Receives one Graphviz DOT file when graphviz output is requested. Read more
Auto Trait Implementations§
impl Freeze for DirectoryCompilerHost
impl RefUnwindSafe for DirectoryCompilerHost
impl Send for DirectoryCompilerHost
impl Sync for DirectoryCompilerHost
impl Unpin for DirectoryCompilerHost
impl UnsafeUnpin for DirectoryCompilerHost
impl UnwindSafe for DirectoryCompilerHost
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