pub enum SavedState {
Working,
Stored,
}Expand description
Identifier values for the saved state of some data / files.
Most “identifier” types in this module use a series of alphanumeric characters to
identify an instance in the same manner that the Octatrack uses,
e.g. TrackId::One or BankId::A
This SavedState “identifier” type is different.
It will never be used with id*() methods to access the members of a collection.
It is used in two locations to model Octatrack behaviour:
- Accessing the saved or unsaved set of
Partswithin aBankFilevia theparts()method. - Identifying which
ProjectFile,BankFile,ArrangementFileorMarkersFileshould be read from / written to.
Variants§
Working
*.work files – working copy
§Note on File Creates/Writes
§Whole Project
Data is written to all *.work files when either a SYNC TO CARD or a SAVE PROJECT
operation is executed from the Octatrack’s Project menu.
§Save Bank
Data is written to bank<ID>.work file each time the SAVE BANK operation is executed from
the Octatrack’s Project menu.
§Save Arrangement
Data is written to arr<ID>.work file when the SAVE ARRANGEMENT operation is executed
from the Octatrack’s Arranger sub-menu.
Stored
*.strd files – restorable, stored copy.
§Note on File Creates/Writes
§Whole Project
Data is written to new *.strd files on the first SAVE PROJECT operation from
the Octatrack’s project menu.
Subsequent SAVE PROJECT operations then save to those same files.
§Save Bank
A bank<ID>.strd file is created when the SAVE BANK operation is first executed from
the Octatrack’s Project menu.
Data is written to the bank<ID>.strd file each time the SAVE BANK operation is executed
from the Octatrack’s Project menu.
§Save Arrangement
A arr<ID>.strd file is created when the SAVE ARRANGEMENT operation is first executed
from the Octatrack’s Arranger sub-menu.
Data is written to the arr<ID>.strd file each time the SAVE ARRANGEMENT operation is
executed from the Octatrack’s Arranger sub-menu.
Implementations§
Source§impl SavedState
impl SavedState
Sourcepub fn file_extension(&self) -> String
pub fn file_extension(&self) -> String
Returns the relevant file extension for the saved state, for the files that support it.
Trait Implementations§
Source§impl Clone for SavedState
impl Clone for SavedState
Source§fn clone(&self) -> SavedState
fn clone(&self) -> SavedState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SavedState
Source§impl Debug for SavedState
impl Debug for SavedState
Source§impl Display for SavedState
impl Display for SavedState
impl Eq for SavedState
Source§impl Hash for SavedState
impl Hash for SavedState
Source§impl Ord for SavedState
impl Ord for SavedState
Source§fn cmp(&self, other: &SavedState) -> Ordering
fn cmp(&self, other: &SavedState) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SavedState
impl PartialEq for SavedState
Source§impl PartialOrd for SavedState
impl PartialOrd for SavedState
impl StructuralPartialEq for SavedState
Auto Trait Implementations§
impl Freeze for SavedState
impl RefUnwindSafe for SavedState
impl Send for SavedState
impl Sync for SavedState
impl Unpin for SavedState
impl UnsafeUnpin for SavedState
impl UnwindSafe for SavedState
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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