pub enum PrettyCodeTheme {
Single(String),
Multi(BTreeMap<String, String>),
}Expand description
Pretty-code theme spec.
Deserialised untagged: pass a JSON string for single-theme, or an
object { light: "...", dark: "...", ... } for multi-mode output.
Variants§
Single(String)
Single bundled theme name. Emits per-token style="color:#xxx".
Multi(BTreeMap<String, String>)
Map of mode -> bundled theme name. Mode keys are arbitrary
(light, dark, dim, …); they appear in the emitted CSS as
--dmc-{mode} / --dmc-{mode}-bg CSS custom properties.
Trait Implementations§
Source§impl Clone for PrettyCodeTheme
impl Clone for PrettyCodeTheme
Source§fn clone(&self) -> PrettyCodeTheme
fn clone(&self) -> PrettyCodeTheme
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrettyCodeTheme
impl Debug for PrettyCodeTheme
Source§impl Default for PrettyCodeTheme
impl Default for PrettyCodeTheme
Source§fn default() -> PrettyCodeTheme
fn default() -> PrettyCodeTheme
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PrettyCodeTheme
impl<'de> Deserialize<'de> for PrettyCodeTheme
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrettyCodeTheme, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrettyCodeTheme, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PrettyCodeTheme
impl Serialize for PrettyCodeTheme
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 PrettyCodeTheme
impl RefUnwindSafe for PrettyCodeTheme
impl Send for PrettyCodeTheme
impl Sync for PrettyCodeTheme
impl Unpin for PrettyCodeTheme
impl UnsafeUnpin for PrettyCodeTheme
impl UnwindSafe for PrettyCodeTheme
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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