[−][src]Struct syntect::highlighting::ThemeSet
Fields
themes: BTreeMap<String, Theme>
Methods
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 hereSolarized (dark)
andSolarized (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]
folder: P
) -> Result<Vec<PathBuf>, LoadingError>
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]
r: &mut R
) -> Result<Theme, LoadingError>
Loads a theme given a readable stream
pub fn load_from_folder<P: AsRef<Path>>(
folder: P
) -> Result<ThemeSet, LoadingError>
[src]
folder: P
) -> Result<ThemeSet, LoadingError>
Generate a ThemeSet
from all themes in a folder
pub fn add_from_folder<P: AsRef<Path>>(
&mut self,
folder: P
) -> Result<(), LoadingError>
[src]
&mut self,
folder: P
) -> Result<(), LoadingError>
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for ThemeSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for ThemeSet
impl Send for ThemeSet
impl Sync for ThemeSet
impl Unpin for ThemeSet
impl UnwindSafe for ThemeSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,