pub struct WorkspaceInfo {
pub storage_id: String,
pub folder_path: Option<PathBuf>,
pub workspace_file: Option<PathBuf>,
}Expand description
Information about a VS Code workspace from workspace.json
Fields§
§storage_id: StringThe workspace storage ID (directory name hash)
folder_path: Option<PathBuf>The workspace folder path (from “folder” field)
workspace_file: Option<PathBuf>The workspace file path (from “workspace” field, for multi-root)
Implementations§
Source§impl WorkspaceInfo
impl WorkspaceInfo
Sourcepub fn from_storage_dir(storage_dir: &Path) -> Result<Self, CopilotError>
pub fn from_storage_dir(storage_dir: &Path) -> Result<Self, CopilotError>
Parse workspace.json from a workspace storage directory
§Errors
Returns an error if the file cannot be read or parsed.
Trait Implementations§
Source§impl Clone for WorkspaceInfo
impl Clone for WorkspaceInfo
Source§fn clone(&self) -> WorkspaceInfo
fn clone(&self) -> WorkspaceInfo
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 Debug for WorkspaceInfo
impl Debug for WorkspaceInfo
Source§impl<'de> Deserialize<'de> for WorkspaceInfo
impl<'de> Deserialize<'de> for WorkspaceInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkspaceInfo
impl PartialEq for WorkspaceInfo
Source§impl Serialize for WorkspaceInfo
impl Serialize for WorkspaceInfo
impl Eq for WorkspaceInfo
impl StructuralPartialEq for WorkspaceInfo
Auto Trait Implementations§
impl Freeze for WorkspaceInfo
impl RefUnwindSafe for WorkspaceInfo
impl Send for WorkspaceInfo
impl Sync for WorkspaceInfo
impl Unpin for WorkspaceInfo
impl UnwindSafe for WorkspaceInfo
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