pub struct Core { /* private fields */ }Implementations§
Source§impl Core
impl Core
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new instance of the Core struct.
This function reads the configuration file and populates the Core struct with
the configuration and default system information.
Sourcepub fn new_with(flags: Flags, layout: Vec<LayoutItem>) -> Self
pub fn new_with(flags: Flags, layout: Vec<LayoutItem>) -> Self
Creates a new Core from explicit flags and layout values.
Sourcepub fn get_info_layout(&self) -> String
pub fn get_info_layout(&self) -> String
Builds the final colorized layout output using the loaded configuration.
Each entry in the layout is resolved against the configured flags. Module data is collected in parallel and rendered in the configured order so that expensive lookups overlap without changing how the output is composed.
§Returns
A single colorized String containing the assembled module output.
Sourcepub fn render_layout(&self, data: &Data) -> String
pub fn render_layout(&self, data: &Data) -> String
Renders the layout using pre-collected data.
Sourcepub fn collect_data(&self) -> Data
pub fn collect_data(&self) -> Data
Collects data for all modules referenced in the configured layout.
pub fn get_ascii_and_colors(&self) -> (String, HashMap<&str, &str>)
pub fn get_ascii_and_colors_for_distro( &self, distro_override: Option<&str>, ) -> (String, HashMap<&str, &str>)
Auto Trait Implementations§
impl Freeze for Core
impl RefUnwindSafe for Core
impl Send for Core
impl Sync for Core
impl Unpin for Core
impl UnwindSafe for Core
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more