pub struct ThemeSet {
pub themes: BTreeMap<String, Theme>,
}Available on crate feature
syntect only.Expand description
syntect types used by SyntectHighlighter::from_parts, re-exported so
you do not need a direct dependency on syntect.
Fields§
§themes: BTreeMap<String, Theme>Implementations§
Source§impl ThemeSet
impl ThemeSet
Sourcepub fn load_defaults() -> ThemeSet
Available on crate feature default-themes only.
pub fn load_defaults() -> ThemeSet
default-themes only.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.lightInspiredGitHubfrom hereSolarized (dark)andSolarized (light)
Source§impl ThemeSet
A set of themes, includes convenient methods for loading and discovering themes.
impl ThemeSet
A set of themes, includes convenient methods for loading and discovering themes.
Sourcepub fn discover_theme_paths<P>(folder: P) -> Result<Vec<PathBuf>, LoadingError>
pub fn discover_theme_paths<P>(folder: P) -> Result<Vec<PathBuf>, LoadingError>
Returns all the themes found in a folder
This is good for enumerating before loading one with get_theme
Sourcepub fn get_theme<P>(path: P) -> Result<Theme, LoadingError>
Available on crate feature plist-load only.
pub fn get_theme<P>(path: P) -> Result<Theme, LoadingError>
plist-load only.Loads a theme given a path to a .tmTheme file
Sourcepub fn load_from_reader<R>(r: &mut R) -> Result<Theme, LoadingError>
Available on crate feature plist-load only.
pub fn load_from_reader<R>(r: &mut R) -> Result<Theme, LoadingError>
plist-load only.Loads a theme given a readable stream
Sourcepub fn load_from_folder<P>(folder: P) -> Result<ThemeSet, LoadingError>
Available on crate feature plist-load only.
pub fn load_from_folder<P>(folder: P) -> Result<ThemeSet, LoadingError>
plist-load only.Generate a ThemeSet from all themes in a folder
Sourcepub fn add_from_folder<P>(&mut self, folder: P) -> Result<(), LoadingError>
Available on crate feature plist-load only.
pub fn add_from_folder<P>(&mut self, folder: P) -> Result<(), LoadingError>
plist-load only.Load all the themes in the folder into this ThemeSet
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ThemeSet
impl<'de> Deserialize<'de> for ThemeSet
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeSet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeSet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ThemeSet
impl Serialize for ThemeSet
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ThemeSet
impl RefUnwindSafe for ThemeSet
impl Send for ThemeSet
impl Sync for ThemeSet
impl Unpin for ThemeSet
impl UnsafeUnpin for ThemeSet
impl UnwindSafe for ThemeSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.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 moreimpl<T> MaybeClone for T
impl<T> MaybeDebug for T
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().