Struct bliss_audio::library::BaseConfig
source · pub struct BaseConfig { /* private fields */ }
Expand description
The minimum configuration an application needs to work with a Library.
Implementations§
source§impl BaseConfig
impl BaseConfig
sourcepub fn new(
config_path: Option<PathBuf>,
database_path: Option<PathBuf>,
number_cores: Option<NonZeroUsize>
) -> Result<Self>
pub fn new( config_path: Option<PathBuf>, database_path: Option<PathBuf>, number_cores: Option<NonZeroUsize> ) -> Result<Self>
Create a new, basic config. Upon calls of Config.write()
, it will be
written to config_path
.
Any path omitted will instead default to a “clever” path using
data directory inference. The number of cores is the number of cores
that should be used for any analysis. If not provided, it will default
to the computer’s number of cores.
Trait Implementations§
source§impl AppConfigTrait for BaseConfig
impl AppConfigTrait for BaseConfig
source§fn base_config(&self) -> &BaseConfig
fn base_config(&self) -> &BaseConfig
This trait should return the BaseConfig from the parent,
user-created
Config
.source§fn base_config_mut(&mut self) -> &mut BaseConfig
fn base_config_mut(&mut self) -> &mut BaseConfig
This trait should return the BaseConfig from the parent,
user-created
Config
.source§fn serialize_config(&self) -> Result<String>
fn serialize_config(&self) -> Result<String>
source§fn set_number_cores(&mut self, number_cores: NonZeroUsize) -> Result<()>
fn set_number_cores(&mut self, number_cores: NonZeroUsize) -> Result<()>
Set the number of desired cores for analysis, and write it to the
configuration file.
source§fn get_number_cores(&self) -> NonZeroUsize
fn get_number_cores(&self) -> NonZeroUsize
Get the number of desired cores for analysis, and write it to the
configuration file.
source§fn deserialize_config(data: &str) -> Result<Self>
fn deserialize_config(data: &str) -> Result<Self>
Default implementation to load a config from a JSON file.
Reads from a string. Read more
source§impl Clone for BaseConfig
impl Clone for BaseConfig
source§fn clone(&self) -> BaseConfig
fn clone(&self) -> BaseConfig
Returns a copy 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 BaseConfig
impl Debug for BaseConfig
source§impl<'de> Deserialize<'de> for BaseConfig
impl<'de> Deserialize<'de> for BaseConfig
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 BaseConfig
impl PartialEq for BaseConfig
source§fn eq(&self, other: &BaseConfig) -> bool
fn eq(&self, other: &BaseConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BaseConfig
impl Serialize for BaseConfig
impl Eq for BaseConfig
impl StructuralEq for BaseConfig
impl StructuralPartialEq for BaseConfig
Auto Trait Implementations§
impl RefUnwindSafe for BaseConfig
impl Send for BaseConfig
impl Sync for BaseConfig
impl Unpin for BaseConfig
impl UnwindSafe for BaseConfig
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
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
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more