[−][src]Trait c2rust_refactor::file_io::FileIO
Required methods
fn read_file(&self, path: &Path) -> Result<String>
fn write_file(&self, path: &Path, s: &str) -> Result<()>
Provided methods
fn end_rewrite(&self, sm: &SourceMap) -> Result<()>
Called to indicate the end of a rewriting operation. Any save_file
or save_rewrites
operations since the previous end_rewrite
(or since the construction of the FileIO
object) are part of the logical rewrite.
fn file_exists(&self, path: &Path) -> bool
fn abs_path(&self, path: &Path) -> Result<PathBuf>
fn save_rewrites(
&self,
sm: &SourceMap,
sf: &SourceFile,
rws: &[TextRewrite],
nodes: &[(Span, NodeId)]
) -> Result<()>
&self,
sm: &SourceMap,
sf: &SourceFile,
rws: &[TextRewrite],
nodes: &[(Span, NodeId)]
) -> Result<()>
fn save_marks(
&self,
krate: &Crate,
sm: &SourceMap,
node_id_map: &HashMap<NodeId, NodeId>,
marks: &HashSet<(NodeId, Symbol)>
) -> Result<()>
&self,
krate: &Crate,
sm: &SourceMap,
node_id_map: &HashMap<NodeId, NodeId>,
marks: &HashSet<(NodeId, Symbol)>
) -> Result<()>
Implementors
impl FileIO for RealFileIO
[src]
fn end_rewrite(&self, _sm: &SourceMap) -> Result<()>
[src]
fn read_file(&self, path: &Path) -> Result<String>
[src]
fn write_file(&self, path: &Path, s: &str) -> Result<()>
[src]
fn save_rewrites(
&self,
sm: &SourceMap,
sf: &SourceFile,
rws: &[TextRewrite],
nodes: &[(Span, NodeId)]
) -> Result<()>
[src]
&self,
sm: &SourceMap,
sf: &SourceFile,
rws: &[TextRewrite],
nodes: &[(Span, NodeId)]
) -> Result<()>
fn save_marks(
&self,
krate: &Crate,
_sm: &SourceMap,
node_id_map: &HashMap<NodeId, NodeId>,
marks: &HashSet<(NodeId, Symbol)>
) -> Result<()>
[src]
&self,
krate: &Crate,
_sm: &SourceMap,
node_id_map: &HashMap<NodeId, NodeId>,
marks: &HashSet<(NodeId, Symbol)>
) -> Result<()>