pub struct Theme {
pub layout: Layout,
pub base: Base,
pub highlight: Highlight,
pub border: Border,
pub title: Title,
pub editor: Editor,
pub hide_footer: bool,
pub hide_status: bool,
}Fields§
§layout: Layout§base: Base§highlight: Highlight§border: Border§title: Title§editor: Editor§hide_status: boolImplementations§
Source§impl Theme
impl Theme
Sourcepub fn init(config: &Config)
pub fn init(config: &Config)
Initializes the Theme from a config.
Examples found in repository?
examples/parse.rs (line 5)
3fn main() {
4 let file = String::from("assets/default.toml");
5 Theme::init(&Config::new(Some(file)));
6
7 let theme = Theme::global();
8 println!("Theme base: {:?}", theme.base);
9 println!(
10 "Border type focused: {:?}",
11 theme.border.border_type_focused
12 );
13 println!(
14 "Border type unfocused: {:?}",
15 theme.border.border_type_unfocused
16 );
17}Sourcepub fn global() -> &'static Theme
pub fn global() -> &'static Theme
Gets the globally shared theme data
Examples found in repository?
examples/parse.rs (line 7)
3fn main() {
4 let file = String::from("assets/default.toml");
5 Theme::init(&Config::new(Some(file)));
6
7 let theme = Theme::global();
8 println!("Theme base: {:?}", theme.base);
9 println!(
10 "Border type focused: {:?}",
11 theme.border.border_type_focused
12 );
13 println!(
14 "Border type unfocused: {:?}",
15 theme.border.border_type_unfocused
16 );
17}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
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§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