pub struct Session {Show 15 fields
pub version: u32,
pub recent: Vec<PathBuf>,
pub recent_sortings: Vec<PathBuf>,
pub workspace: Workspace,
pub dark: Option<bool>,
pub tune_suggested: bool,
pub accent: Option<Rgb>,
pub dark_plots: bool,
pub explore: ExploreSession,
pub panel_widths: BTreeMap<String, f32>,
pub panel_open: BTreeMap<String, bool>,
pub servers: Vec<ServerProfile>,
pub results_dir: Option<PathBuf>,
pub runtime: Option<String>,
pub reopen_last: bool,
}Fields§
§version: u32§recent: Vec<PathBuf>§recent_sortings: Vec<PathBuf>§workspace: Workspace§dark: Option<bool>Some(true): dark, Some(false): light, None: follow the system.
tune_suggested: bool“Tune this device” was suggested (once, at the first launch).
accent: Option<Rgb>The accent the user picked (None: dsp-kitchen’s lime). Saved as "#rrggbb"; a number
(0xRRGGBB) or a colour that does not parse still reads.
dark_plots: boolKeep plots dark in the light theme.
explore: ExploreSession§panel_widths: BTreeMap<String, f32>Widths (heights for bottom panels) of resizable panels, by key (explore.left, …).
panel_open: BTreeMap<String, bool>Side panels shown or hidden, by key (sorting.left, …).
servers: Vec<ServerProfile>Servers (dspk serve) the user works with (Settings).
results_dir: Option<PathBuf>Where results fetched from servers go (None: Session::default_results_dir).
runtime: Option<String>The compute runtime (wgpu, cuda, cpu; None: the first that is compiled in). Takes
effect at the next start.
reopen_last: boolOpen the last recording when the app starts (default off: the start screen).
Implementations§
Source§impl Session
impl Session
pub const VERSION: u32 = 1
pub fn new() -> Self
Sourcepub fn default_results_dir() -> PathBuf
pub fn default_results_dir() -> PathBuf
Results fetched from servers by default: ~/dspk/remote (the home folder, or the current
one when there is no home).
Sourcepub fn results_dir(&self) -> PathBuf
pub fn results_dir(&self) -> PathBuf
Where results fetched from servers go.
Sourcepub fn recipes_dir() -> Option<PathBuf>
pub fn recipes_dir() -> Option<PathBuf>
The user’s recipe library: <config>/dspk-app/recipes/.
pub fn path() -> Option<PathBuf>
Sourcepub fn document_path() -> Option<PathBuf>
pub fn document_path() -> Option<PathBuf>
The session document of the open work (views, op chains, linked sortings), next to the
preferences: current-session.json. An agent edits it; the app picks the edits up.
Sourcepub fn load(path: Option<&Path>) -> Self
pub fn load(path: Option<&Path>) -> Self
The saved session; else the Slint app’s recent files; else an empty one.
pub fn save(&self, path: Option<&Path>) -> Result<()>
Sourcepub fn forget_recent(&mut self, path: &Path)
pub fn forget_recent(&mut self, path: &Path)
Forgets path from the recent recordings and sortings.
Sourcepub fn clear_recent(&mut self)
pub fn clear_recent(&mut self)
Forgets every recent recording and sorting.
Sourcepub fn push_recent(&mut self, path: &Path)
pub fn push_recent(&mut self, path: &Path)
path becomes the newest recent recording.
Sourcepub fn push_recent_sorting(&mut self, path: &Path)
pub fn push_recent_sorting(&mut self, path: &Path)
path becomes the newest recent sorting folder.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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>,
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl Move for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
NoneValue::null_value produces.Source§fn null_value() -> T
fn null_value() -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().