pub struct SyntaxConfigBuilder { /* private fields */ }Available on crate feature
custom_syntax only.Expand description
Builder helper to reconfigure the syntax.
A new builder is returned by SyntaxConfig::builder.
Implementations§
Source§impl SyntaxConfigBuilder
impl SyntaxConfigBuilder
Sourcepub fn block_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
pub fn block_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
Sets the block start and end delimiters.
Sourcepub fn variable_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
pub fn variable_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
Sets the variable start and end delimiters.
Sourcepub fn comment_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
pub fn comment_delimiters<S, E>(&mut self, s: S, e: E) -> &mut Self
Sets the comment start and end delimiters.
Sourcepub fn line_statement_prefix<S>(&mut self, s: S) -> &mut Self
pub fn line_statement_prefix<S>(&mut self, s: S) -> &mut Self
Sets the line statement prefix.
By default this is the empty string which disables the line statement prefix feature.
Sourcepub fn line_comment_prefix<S>(&mut self, s: S) -> &mut Self
pub fn line_comment_prefix<S>(&mut self, s: S) -> &mut Self
Sets the line comment prefix.
By default this is the empty string which disables the line comment prefix feature.
Sourcepub fn build(&self) -> Result<SyntaxConfig, Error>
pub fn build(&self) -> Result<SyntaxConfig, Error>
Builds the final syntax config.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyntaxConfigBuilder
impl RefUnwindSafe for SyntaxConfigBuilder
impl Send for SyntaxConfigBuilder
impl Sync for SyntaxConfigBuilder
impl Unpin for SyntaxConfigBuilder
impl UnsafeUnpin for SyntaxConfigBuilder
impl UnwindSafe for SyntaxConfigBuilder
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