pub struct MealPlannerConfig { /* private fields */ }Expand description
Configuration shared by the Meal Planner application and its adapters.
Implementations§
Source§impl MealPlannerConfig
impl MealPlannerConfig
Sourcepub fn from_data_dir(data_dir: impl AsRef<Path>) -> Self
pub fn from_data_dir(data_dir: impl AsRef<Path>) -> Self
Build configuration using the default database location in the server data directory.
Sourcepub fn new(database_path: impl Into<PathBuf>) -> Result<Self, MealPlannerError>
pub fn new(database_path: impl Into<PathBuf>) -> Result<Self, MealPlannerError>
Build configuration with an explicit SQLite database path.
Sourcepub fn database_path(&self) -> &Path
pub fn database_path(&self) -> &Path
Return the configured SQLite database path.
Trait Implementations§
Source§impl Clone for MealPlannerConfig
impl Clone for MealPlannerConfig
Source§impl Debug for MealPlannerConfig
impl Debug for MealPlannerConfig
impl Eq for MealPlannerConfig
Source§impl PartialEq for MealPlannerConfig
impl PartialEq for MealPlannerConfig
impl StructuralPartialEq for MealPlannerConfig
Auto Trait Implementations§
impl Freeze for MealPlannerConfig
impl RefUnwindSafe for MealPlannerConfig
impl Send for MealPlannerConfig
impl Sync for MealPlannerConfig
impl Unpin for MealPlannerConfig
impl UnsafeUnpin for MealPlannerConfig
impl UnwindSafe for MealPlannerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.