Struct git2::ConfigEntry
source · pub struct ConfigEntry<'cfg> { /* private fields */ }
Expand description
A struct representing a certain entry owned by a Config
instance.
An entry has a name, a value, and a level it applies to.
Implementations§
source§impl<'cfg> ConfigEntry<'cfg>
impl<'cfg> ConfigEntry<'cfg>
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Gets the name of this entry.
May return None
if the name is not valid utf-8
sourcepub fn name_bytes(&self) -> &[u8] ⓘ
pub fn name_bytes(&self) -> &[u8] ⓘ
Gets the name of this entry as a byte slice.
sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
Gets the value of this entry.
May return None
if the value is not valid utf-8
§Panics
Panics when no value is defined.
sourcepub fn value_bytes(&self) -> &[u8] ⓘ
pub fn value_bytes(&self) -> &[u8] ⓘ
sourcepub fn has_value(&self) -> bool
pub fn has_value(&self) -> bool
Returns true
when a value is defined otherwise false
.
No value defined is a short-hand to represent a Boolean true
.
sourcepub fn level(&self) -> ConfigLevel
pub fn level(&self) -> ConfigLevel
Gets the configuration level of this entry.
sourcepub fn include_depth(&self) -> u32
pub fn include_depth(&self) -> u32
Depth of includes where this variable was found
Trait Implementations§
Auto Trait Implementations§
impl<'cfg> RefUnwindSafe for ConfigEntry<'cfg>
impl<'cfg> !Send for ConfigEntry<'cfg>
impl<'cfg> !Sync for ConfigEntry<'cfg>
impl<'cfg> Unpin for ConfigEntry<'cfg>
impl<'cfg> UnwindSafe for ConfigEntry<'cfg>
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