pub struct Workspace {
pub viewport: FxHashSet<Arc<Url>>,
pub listeners: Vec<Sender<WorkspaceEvent>>,
pub environment: Environment,
/* private fields */
}Fields§
§viewport: FxHashSet<Arc<Url>>§listeners: Vec<Sender<WorkspaceEvent>>§environment: EnvironmentImplementations§
Source§impl Workspace
impl Workspace
pub fn new(environment: Environment) -> Self
pub fn get(&self, uri: &Url) -> Option<Document>
pub fn remove(&mut self, uri: &Url)
pub fn iter<'a>(&'a self) -> impl Iterator<Item = Document> + 'a
pub fn register_watcher(&mut self, watcher: RecommendedWatcher)
pub fn watch_dir(&self, path: &Path)
pub fn open( &mut self, uri: Arc<Url>, text: Arc<String>, language: DocumentLanguage, ) -> Result<Document>
pub fn reload(&mut self, path: PathBuf) -> Result<Option<Document>>
pub fn load(&mut self, path: PathBuf) -> Result<Option<Document>>
pub fn close(&mut self, uri: &Url)
pub fn is_open(&self, uri: &Url) -> bool
pub fn slice(&self, uri: &Url) -> Self
pub fn find_parent(&self, uri: &Url) -> Option<Document>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more