pub struct ProfilesIndex {
pub version: u32,
pub profiles: HashMap<String, ProfileIndexEntry>,
}Expand description
profiles.toml structure
Fields§
§version: u32File format version
profiles: HashMap<String, ProfileIndexEntry>Profiles map: name -> entry
Implementations§
Source§impl ProfilesIndex
impl ProfilesIndex
Sourcepub fn upsert(&mut self, name: &str, entry: ProfileIndexEntry)
pub fn upsert(&mut self, name: &str, entry: ProfileIndexEntry)
Add or update a profile entry
Sourcepub fn remove(&mut self, name: &str) -> Option<ProfileIndexEntry>
pub fn remove(&mut self, name: &str) -> Option<ProfileIndexEntry>
Remove a profile entry
Sourcepub fn get(&self, name: &str) -> Option<&ProfileIndexEntry>
pub fn get(&self, name: &str) -> Option<&ProfileIndexEntry>
Get a profile entry
Trait Implementations§
Source§impl Clone for ProfilesIndex
impl Clone for ProfilesIndex
Source§fn clone(&self) -> ProfilesIndex
fn clone(&self) -> ProfilesIndex
Returns a duplicate 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 ProfilesIndex
impl Debug for ProfilesIndex
Source§impl Default for ProfilesIndex
impl Default for ProfilesIndex
Source§impl<'de> Deserialize<'de> for ProfilesIndex
impl<'de> Deserialize<'de> for ProfilesIndex
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
Auto Trait Implementations§
impl Freeze for ProfilesIndex
impl RefUnwindSafe for ProfilesIndex
impl Send for ProfilesIndex
impl Sync for ProfilesIndex
impl Unpin for ProfilesIndex
impl UnwindSafe for ProfilesIndex
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