pub struct SyntaxThemeBuilder { /* private fields */ }Expand description
Builder for syntax themes without exposing the capture map representation.
Implementations§
Source§impl SyntaxThemeBuilder
impl SyntaxThemeBuilder
Sourcepub fn capture(self, name: impl Into<String>, style: SyntaxStyle) -> Self
pub fn capture(self, name: impl Into<String>, style: SyntaxStyle) -> Self
Assigns a style to an exact capture or parent capture prefix.
Sourcepub fn palette(self, palette: DiffPalette) -> Self
pub fn palette(self, palette: DiffPalette) -> Self
Sets the semantic diff palette retained by compatibility aggregate themes.
Sourcepub fn build(self) -> Result<SyntaxTheme, ThemeError>
pub fn build(self) -> Result<SyntaxTheme, ThemeError>
Builds the immutable theme and derives its stable revision.
§Errors
Returns an error if the internal versioned representation cannot be serialized.
Auto Trait Implementations§
impl Freeze for SyntaxThemeBuilder
impl RefUnwindSafe for SyntaxThemeBuilder
impl Send for SyntaxThemeBuilder
impl Sync for SyntaxThemeBuilder
impl Unpin for SyntaxThemeBuilder
impl UnsafeUnpin for SyntaxThemeBuilder
impl UnwindSafe for SyntaxThemeBuilder
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