Struct ra_ap_vfs::file_set::FileSetConfig
source · pub struct FileSetConfig { /* private fields */ }
Expand description
This contains path prefixes to partition a Vfs
into FileSet
s.
§Example
let mut builder = FileSetConfigBuilder::default();
builder.add_file_set(vec![VfsPath::new_virtual_path("/src".to_string())]);
let config = builder.build();
let mut file_system = Vfs::default();
file_system.set_file_contents(VfsPath::new_virtual_path("/src/main.rs".to_string()), Some(vec![]));
file_system.set_file_contents(VfsPath::new_virtual_path("/src/lib.rs".to_string()), Some(vec![]));
file_system.set_file_contents(VfsPath::new_virtual_path("/build.rs".to_string()), Some(vec![]));
// contains the sets :
// { "/src/main.rs", "/src/lib.rs" }
// { "build.rs" }
let sets = config.partition(&file_system);
Implementations§
Trait Implementations§
source§impl Debug for FileSetConfig
impl Debug for FileSetConfig
Auto Trait Implementations§
impl Freeze for FileSetConfig
impl RefUnwindSafe for FileSetConfig
impl Send for FileSetConfig
impl Sync for FileSetConfig
impl Unpin for FileSetConfig
impl UnwindSafe for FileSetConfig
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