pub struct Profiles {
pub path: PathBuf,
pub found_by: &'static str,
pub file: Option<YamlFile>,
pub connections: BTreeMap<String, Profile>,
pub destinations: BTreeMap<String, Profile>,
/* private fields */
}Fields§
§path: PathBufWhere DRE looked for the file.
found_by: &'static strWhy that directory: --profiles-dir, DRE_PROFILES_DIR, the project directory or ~/.dre.
file: Option<YamlFile>None when the file doesn’t exist; loading problems are reported when it’s needed.
connections: BTreeMap<String, Profile>§destinations: BTreeMap<String, Profile>Implementations§
Source§impl Profiles
impl Profiles
pub fn load( dir: &Path, found_by: &'static str, diags: &mut Diagnostics, ) -> Profiles
pub fn exists(&self) -> bool
Sourcepub fn section_key(&self, role: Role) -> &'static str
pub fn section_key(&self, role: Role) -> &'static str
The section key a role’s profiles were read from (sources for an 0.1 file).
pub fn get(&self, role: Role, name: &str) -> Option<&Profile>
Sourcepub fn declares(&self, role: Role, name: &str) -> bool
pub fn declares(&self, role: Role, name: &str) -> bool
Whether a (possibly partially broken) profile of this name is declared in its section.
Sourcepub fn is_builtin_local(&self, name: &str) -> bool
pub fn is_builtin_local(&self, name: &str) -> bool
Whether name means the built-in local destination (no local profile is defined).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Profiles
impl RefUnwindSafe for Profiles
impl Send for Profiles
impl Sync for Profiles
impl Unpin for Profiles
impl UnsafeUnpin for Profiles
impl UnwindSafe for Profiles
Blanket Implementations§
impl<T> Allocation for T
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