pub struct Files<F: 'static = BTreeMap<String, String>> { /* private fields */ }Expand description
A set of files, whose programs are written in the operations of
registry: the Workspace its programs are run with, reading the
programs they place and the files they import from it. A program read
is checked against the operations (see Program::validate).
Each file is read once, and read again once it changes
(Files::write), when its revision changes too.
Implementations§
Source§impl<F: FileStore + 'static> Files<F>
impl<F: FileStore + 'static> Files<F>
Sourcepub fn new(files: F, registry: Rc<OperationRegistry>) -> Rc<Self>
pub fn new(files: F, registry: Rc<OperationRegistry>) -> Rc<Self>
The files files, what they are made into kept in memory.
Sourcepub fn with_cache(
files: F,
registry: Rc<OperationRegistry>,
cache: Cache,
) -> Rc<Self>
pub fn with_cache( files: F, registry: Rc<OperationRegistry>, cache: Cache, ) -> Rc<Self>
The files files, what they are made into kept in cache.
Sourcepub fn registry(&self) -> &Rc<OperationRegistry>
pub fn registry(&self) -> &Rc<OperationRegistry>
The operations its programs are written in.
Trait Implementations§
Source§impl<F: FileStore + 'static> Workspace for Files<F>
impl<F: FileStore + 'static> Workspace for Files<F>
Source§fn program(&self, path: &str) -> GeopResult<Rc<Program>>
fn program(&self, path: &str) -> GeopResult<Rc<Program>>
The program in the file at
path, with the state it was saved
with: the same each time it is asked for while the file does not
change.Source§fn read(&self, path: &str) -> GeopResult<Rc<str>>
fn read(&self, path: &str) -> GeopResult<Rc<str>>
The text of the file at
path: a STEP file a step imports. The same
each time it is asked for while the file does not change.Source§fn resolve(&self, from: &str, name: &str) -> String
fn resolve(&self, from: &str, name: &str) -> String
The path of the file the file at
from names name.Source§fn relative(&self, from: &str, path: &str) -> String
fn relative(&self, from: &str, path: &str) -> String
How the file at
from names the file at path.Source§fn revision(&self, path: &str) -> u64
fn revision(&self, path: &str) -> u64
The revision of the file at
path: changes whenever the file
does, so a node that read it is made again.Auto Trait Implementations§
impl<F = BTreeMap<String, String>> !Freeze for Files<F>
impl<F = BTreeMap<String, String>> !RefUnwindSafe for Files<F>
impl<F = BTreeMap<String, String>> !Send for Files<F>
impl<F = BTreeMap<String, String>> !Sync for Files<F>
impl<F = BTreeMap<String, String>> !UnwindSafe for Files<F>
impl<F> Unpin for Files<F>where
F: Unpin,
impl<F> UnsafeUnpin for Files<F>where
F: UnsafeUnpin,
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