Struct unclog::ComponentSection
source · pub struct ComponentSection {
pub id: String,
pub name: String,
pub maybe_path: Option<String>,
pub entries: Vec<Entry>,
}
Expand description
A section of entries related to a specific component/submodule/package.
Fields§
§id: String
The ID of the component.
name: String
The name of the component.
maybe_path: Option<String>
The path to the component, from the root of the project, if any. Pre-computed and ready to render.
entries: Vec<Entry>
The entries associated with the component.
Implementations§
source§impl ComponentSection
impl ComponentSection
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether or not this section is empty (it’s considered empty when it has no entries).
sourcepub fn read_from_dir<P>(config: &Config, path: P) -> Result<Self>
pub fn read_from_dir<P>(config: &Config, path: P) -> Result<Self>
Attempt to load this component section from the given directory.
pub fn render(&self, config: &Config) -> String
Trait Implementations§
source§impl Clone for ComponentSection
impl Clone for ComponentSection
source§fn clone(&self) -> ComponentSection
fn clone(&self) -> ComponentSection
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 ComponentSection
impl Debug for ComponentSection
source§impl Hash for ComponentSection
impl Hash for ComponentSection
source§impl PartialEq for ComponentSection
impl PartialEq for ComponentSection
source§fn eq(&self, other: &ComponentSection) -> bool
fn eq(&self, other: &ComponentSection) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ComponentSection
impl StructuralPartialEq for ComponentSection
Auto Trait Implementations§
impl RefUnwindSafe for ComponentSection
impl Send for ComponentSection
impl Sync for ComponentSection
impl Unpin for ComponentSection
impl UnwindSafe for ComponentSection
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.