[][src]Struct syntect::highlighting::ThemeSet

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

Fields

themes: BTreeMap<String, Theme>

Implementations

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)

impl ThemeSet[src]

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

pub fn new() -> ThemeSet[src]

Creates an empty set

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

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

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

Loads a theme given a path to a .tmTheme file

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

Loads a theme given a readable stream

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

Generate a ThemeSet from all themes in a folder

pub fn add_from_folder<P: AsRef<Path>>(
    &mut self,
    folder: P
) -> Result<(), LoadingError>
[src]

Load all the themes in the folder into this ThemeSet

Trait Implementations

impl Debug for ThemeSet[src]

impl Default for ThemeSet[src]

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

impl Serialize for ThemeSet[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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.