Struct garden::model::ApplicationContext
source · pub struct ApplicationContext {
pub options: MainOptions,
/* private fields */
}
Fields§
§options: MainOptions
Implementations§
source§impl ApplicationContext
impl ApplicationContext
sourcepub fn new(options: MainOptions) -> Self
pub fn new(options: MainOptions) -> Self
Construct an empty ApplicationContext. Initialization must be performed post-construction.
sourcepub fn from_options(options: &MainOptions) -> Result<Self, GardenError>
pub fn from_options(options: &MainOptions) -> Result<Self, GardenError>
Initialize an ApplicationContext and Configuration from cli::MainOptions.
sourcepub fn from_path_and_root(
pathbuf: PathBuf,
root: Option<&PathBuf>
) -> Result<Self, GardenError>
pub fn from_path_and_root( pathbuf: PathBuf, root: Option<&PathBuf> ) -> Result<Self, GardenError>
Construct an ApplicationContext from a path and root using default MainOptions.
sourcepub fn from_path(pathbuf: PathBuf) -> Result<Self, GardenError>
pub fn from_path(pathbuf: PathBuf) -> Result<Self, GardenError>
Construct an ApplicationContext from a path using default MainOptions.
sourcepub fn from_path_string(path: &str) -> Result<Self, GardenError>
pub fn from_path_string(path: &str) -> Result<Self, GardenError>
Construct an ApplicationContext from a path using default MainOptions.
sourcepub fn from_string(string: &str) -> Result<Self, GardenError>
pub fn from_string(string: &str) -> Result<Self, GardenError>
Construct an ApplicationContext from a string using default MainOptions.
pub fn get_config(&self, id: ConfigId) -> &Configuration
pub fn get_root_id(&self) -> ConfigId
pub fn get_root_config(&self) -> &Configuration
Trait Implementations§
source§impl Clone for ApplicationContext
impl Clone for ApplicationContext
source§fn clone(&self) -> ApplicationContext
fn clone(&self) -> ApplicationContext
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 ApplicationContext
impl Debug for ApplicationContext
Auto Trait Implementations§
impl !RefUnwindSafe for ApplicationContext
impl Send for ApplicationContext
impl !Sync for ApplicationContext
impl Unpin for ApplicationContext
impl UnwindSafe for ApplicationContext
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