pub struct ProjectFile {
pub metadata: OsMetadata,
pub settings: Settings,
pub states: State,
pub slots: SlotsAttributes,
}Expand description
A parsed representation of an Octatrack Project file (project.work or project.strd).
Note: We derive serde::Deserialize and serde::Serialize on this (and all the included subtypes).
But project files are actually string data being parsed directly without
any serde-ing or bincode-ing. This may change in the future to custom
Serialize/Deserialize implementations for string source file data.
But that will only happen if i can work out how to differentiate between
deserializing a yaml/json string and a raw data file’s string data
(we use serde::de::Deserializer::is_human_readable for arrangements
to differentiate between YAML/JSON and string data files, which is a problem here as
we’ll be testing for the difference between YAML/JSON (string data) and String (string data).)
Fields§
§metadata: OsMetadataMetadata key-value pairs from a Project file.
settings: SettingsSettings key-value pairs from a Project file.
states: StateStates key-value pairs from a Project file.
slots: SlotsAttributesSlots key-value pairs from a Project file.
Trait Implementations§
Source§impl Clone for ProjectFile
impl Clone for ProjectFile
Source§fn clone(&self) -> ProjectFile
fn clone(&self) -> ProjectFile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectFile
impl Debug for ProjectFile
Source§impl Default for ProjectFile
impl Default for ProjectFile
Source§impl<'de> Deserialize<'de> for ProjectFile
impl<'de> Deserialize<'de> for ProjectFile
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>,
Source§impl Display for ProjectFile
impl Display for ProjectFile
Source§impl IsDefault for ProjectFile
impl IsDefault for ProjectFile
fn is_default(&self) -> bool
Source§impl OctatrackFileIO for ProjectFile
impl OctatrackFileIO for ProjectFile
Source§fn repr(&self, newlines: Option<bool>) -> Result<(), Box<dyn Error>>where
Self: Debug,
fn repr(&self, newlines: Option<bool>) -> Result<(), Box<dyn Error>>where
Self: Debug,
Source§fn from_data_file(path: &Path) -> Result<Self, Box<dyn Error>>
fn from_data_file(path: &Path) -> Result<Self, Box<dyn Error>>
Source§fn to_data_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
fn to_data_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
Source§fn from_yaml_file(path: &Path) -> Result<Self, Box<dyn Error>>
fn from_yaml_file(path: &Path) -> Result<Self, Box<dyn Error>>
Source§fn from_yaml_str(yaml: &str) -> Result<Self, Box<dyn Error>>
fn from_yaml_str(yaml: &str) -> Result<Self, Box<dyn Error>>
Source§fn to_yaml_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
fn to_yaml_file(&self, path: &Path) -> Result<(), Box<dyn Error>>
Source§fn to_yaml_string(&self) -> Result<String, Box<dyn Error>>
fn to_yaml_string(&self) -> Result<String, Box<dyn Error>>
Source§fn from_json_file(path: &Path) -> Result<Self, Box<dyn Error>>
fn from_json_file(path: &Path) -> Result<Self, Box<dyn Error>>
Source§fn from_json_str(json: &str) -> Result<Self, Box<dyn Error>>
fn from_json_str(json: &str) -> Result<Self, Box<dyn Error>>
Source§impl PartialEq for ProjectFile
impl PartialEq for ProjectFile
Source§impl Serialize for ProjectFile
impl Serialize for ProjectFile
impl StructuralPartialEq for ProjectFile
Auto Trait Implementations§
impl Freeze for ProjectFile
impl RefUnwindSafe for ProjectFile
impl Send for ProjectFile
impl Sync for ProjectFile
impl Unpin for ProjectFile
impl UnwindSafe for ProjectFile
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> 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