[][src]Struct unsegen_pager::ThemeSet

pub struct ThemeSet {
    pub themes: BTreeMap<String, Theme>,
}

Fields

themes: BTreeMap<String, Theme>

Methods

impl ThemeSet[src]

A set of themes, includes convenient methods for loading and discovering themes.

pub fn discover_theme_paths<P>(folder: P) -> Result<Vec<PathBuf>, LoadingError> where
    P: AsRef<Path>, 
[src]

Returns all the themes found in a folder, good for enumerating before loading one with get_theme

pub fn get_theme<P>(path: P) -> Result<Theme, LoadingError> where
    P: AsRef<Path>, 
[src]

Loads a theme given a path to a .tmTheme file

pub fn load_from_reader<R>(r: &mut R) -> Result<Theme, LoadingError> where
    R: Seek + BufRead
[src]

Loads a theme given a readable stream

pub fn load_from_folder<P>(folder: P) -> Result<ThemeSet, LoadingError> where
    P: AsRef<Path>, 
[src]

Loads all the themes in a folder

impl ThemeSet[src]

pub fn load_defaults() -> ThemeSet[src]

Loads the set of default themes Currently includes (these are the keys for the map):

  • base16-ocean.dark,base16-eighties.dark,base16-mocha.dark,base16-ocean.light
  • InspiredGitHub from here
  • Solarized (dark) and Solarized (light)

Trait Implementations

impl<'de> Deserialize<'de> for ThemeSet[src]

impl Serialize for ThemeSet[src]

impl Debug for ThemeSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]