Struct upon::SyntaxBuilder
source · pub struct SyntaxBuilder<'a> { /* private fields */ }
Expand description
A builder for the syntax configuration.
This struct is typically created using Syntax::builder()
.
Implementations§
source§impl<'a> SyntaxBuilder<'a>
impl<'a> SyntaxBuilder<'a>
sourcepub fn expr(&mut self, begin_expr: &'a str, end_expr: &'a str) -> &mut Self
pub fn expr(&mut self, begin_expr: &'a str, end_expr: &'a str) -> &mut Self
Set the block syntax.
If not set then the expression syntax will not be available.
§Panics
If either of the strings are empty.
sourcepub fn block(&mut self, begin_block: &'a str, end_block: &'a str) -> &mut Self
pub fn block(&mut self, begin_block: &'a str, end_block: &'a str) -> &mut Self
Set the block syntax.
If not set then the block syntax will not be available.
§Panics
If either of the strings are empty.
Trait Implementations§
source§impl<'a> Clone for SyntaxBuilder<'a>
impl<'a> Clone for SyntaxBuilder<'a>
source§fn clone(&self) -> SyntaxBuilder<'a>
fn clone(&self) -> SyntaxBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> RefUnwindSafe for SyntaxBuilder<'a>
impl<'a> Send for SyntaxBuilder<'a>
impl<'a> Sync for SyntaxBuilder<'a>
impl<'a> Unpin for SyntaxBuilder<'a>
impl<'a> UnwindSafe for SyntaxBuilder<'a>
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