Struct gix_config::file::Metadata
source · pub struct Metadata {
pub path: Option<PathBuf>,
pub source: Source,
pub level: u8,
pub trust: Trust,
}
Expand description
Additional information about a section.
Fields§
§path: Option<PathBuf>
The file path of the source, if known.
source: Source
Where the section is coming from.
level: u8
The levels of indirection of the file, with 0 being a section
that was directly loaded, and 1 being an include.path
of a
level 0 file.
trust: Trust
The trust-level for the section this meta-data is associated with.
Implementations§
source§impl Metadata
impl Metadata
Instantiation
sourcepub fn try_from_path(path: impl Into<PathBuf>, source: Source) -> Result<Self>
pub fn try_from_path(path: impl Into<PathBuf>, source: Source) -> Result<Self>
Return metadata as derived from the given path
at source
, which will also be used to derive the trust level
by checking its ownership.
Trait Implementations§
source§impl Ord for Metadata
impl Ord for Metadata
source§impl PartialOrd for Metadata
impl PartialOrd for Metadata
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)