pub struct Group<'a> {
pub left_bracket: &'a str,
pub expr: Expression<'a>,
pub right_bracket: &'a str,
}
Expand description
A bracketd group that allows inserting complicated expressions in simplex contexts
In some instances a bracket won’t be parsed to close a group out, in that case the bracket will be the empty string.
Fields§
§left_bracket: &'a str
The left bracket
expr: Expression<'a>
The grouped expression
right_bracket: &'a str
The right bracket
Implementations§
Source§impl<'a> Group<'a>
impl<'a> Group<'a>
Sourcepub fn new<E: Into<Expression<'a>>>(
left_bracket: &'a str,
expr: E,
right_bracket: &'a str,
) -> Self
pub fn new<E: Into<Expression<'a>>>( left_bracket: &'a str, expr: E, right_bracket: &'a str, ) -> Self
Create a new group with two brackets and an expression
Trait Implementations§
impl<'a> Eq for Group<'a>
impl<'a> StructuralPartialEq for Group<'a>
Auto Trait Implementations§
impl<'a> Freeze for Group<'a>
impl<'a> RefUnwindSafe for Group<'a>
impl<'a> Send for Group<'a>
impl<'a> Sync for Group<'a>
impl<'a> Unpin for Group<'a>
impl<'a> UnwindSafe for Group<'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