pub struct WorkspaceFile {
pub id: WorkspaceId,
pub name: String,
pub created: Option<Date>,
pub folder: Option<PathBuf>,
pub profiles: Vec<WorkspaceProfile>,
pub backup_skip: Vec<String>,
pub backup_assets: bool,
}Expand description
The contents of a workspace’s workspace.qcode.
Fields§
§id: WorkspaceIdThe workspace’s identifier, which is also the name of its folder.
name: StringThe name the user gave it, in the user’s own writing.
created: Option<Date>The day the workspace was made, when the file records a readable one.
folder: Option<PathBuf>The person’s own folder the workspace works in where it stands, when it was made that way:
an absolute path on this machine, mounted as the containers’ work folder in place of the
workspace’s own Work/. None is a workspace with a Work/ of its own, which every file
written before the choice existed is.
profiles: Vec<WorkspaceProfile>The profiles the workspace carries, in the order the file lists them.
backup_skip: Vec<String>The folders and files inside Work/ its backup leaves out, each a path inside the
workspace written with /, in the order the file lists them.
backup_assets: boolWhether its backup takes Assets/ too. Off unless the file says so: assets are often
large and kept elsewhere as well.
Implementations§
Source§impl WorkspaceFile
impl WorkspaceFile
Sourcepub fn new(id: WorkspaceId, name: impl Into<String>, created: Date) -> Self
pub fn new(id: WorkspaceId, name: impl Into<String>, created: Date) -> Self
A workspace made today with no profiles yet.
Sourcepub fn parse(file: &str, text: &str) -> Loaded<Option<Self>>
pub fn parse(file: &str, text: &str) -> Loaded<Option<Self>>
Reads a workspace.qcode, reporting problems against file.
The value is None only when the file names no workspace this program could open: the
identifier is missing or is not one. Anything else — a missing name, an unreadable date,
a profile without a name, a key nobody knows — is a diagnostic beside a usable workspace.
Trait Implementations§
Source§impl Clone for WorkspaceFile
impl Clone for WorkspaceFile
Source§impl Debug for WorkspaceFile
impl Debug for WorkspaceFile
impl Eq for WorkspaceFile
Source§impl PartialEq for WorkspaceFile
impl PartialEq for WorkspaceFile
impl StructuralPartialEq for WorkspaceFile
Auto Trait Implementations§
impl Freeze for WorkspaceFile
impl RefUnwindSafe for WorkspaceFile
impl Send for WorkspaceFile
impl Sync for WorkspaceFile
impl Unpin for WorkspaceFile
impl UnsafeUnpin for WorkspaceFile
impl UnwindSafe for WorkspaceFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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