pub struct KAndRBracket {
pub head_space: bool,
pub bracket_l: &'static str,
pub bracket_r: &'static str,
}Expand description
K & R style brackets
a {}a {
}Fields§
§head_space: boolWhether to add a space after the keyword
bracket_l: &'static strThe left bracket
bracket_r: &'static strThe right bracket
Implementations§
Source§impl KAndRBracket
impl KAndRBracket
Sourcepub fn curly_braces() -> Self
pub fn curly_braces() -> Self
Build a bracketed block
Sourcepub fn build<'b, 'a, I, T: Text<'a>>(
&self,
items: &[I],
allocator: &'b PrettyProvider,
inline_join: PrettyTree<'a, T>,
block_join: PrettyTree<'a, T>,
) -> PrettyTree<'a, T>where
I: PrettyPrint<'a, T>,
pub fn build<'b, 'a, I, T: Text<'a>>(
&self,
items: &[I],
allocator: &'b PrettyProvider,
inline_join: PrettyTree<'a, T>,
block_join: PrettyTree<'a, T>,
) -> PrettyTree<'a, T>where
I: PrettyPrint<'a, T>,
Build a bracketed block
Trait Implementations§
Source§impl Clone for KAndRBracket
impl Clone for KAndRBracket
Source§fn clone(&self) -> KAndRBracket
fn clone(&self) -> KAndRBracket
Returns a duplicate 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 moreSource§impl Debug for KAndRBracket
impl Debug for KAndRBracket
impl Copy for KAndRBracket
Auto Trait Implementations§
impl Freeze for KAndRBracket
impl RefUnwindSafe for KAndRBracket
impl Send for KAndRBracket
impl Sync for KAndRBracket
impl Unpin for KAndRBracket
impl UnsafeUnpin for KAndRBracket
impl UnwindSafe for KAndRBracket
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