Enum tan_formatting::layout::Layout
source · pub enum Layout {
Indent(Vec<Layout>, Option<usize>),
Stack(Vec<Layout>),
Row(Vec<Layout>, String),
Apply(Box<Layout>),
Item(String),
Ann(HashMap<String, Expr>, Box<Layout>),
Separator,
}Variants§
Indent(Vec<Layout>, Option<usize>)
Indentation block, supports both indentation and alignment.
Stack(Vec<Layout>)
Vertical arrangement
Row(Vec<Layout>, String)
Horizontal arrangement
Apply(Box<Layout>)
Item(String)
Ann(HashMap<String, Expr>, Box<Layout>)
Separator
Implementations§
source§impl Layout
impl Layout
pub fn indent(list: Vec<Layout>) -> Self
pub fn align(list: Vec<Layout>, indent_size: usize) -> Self
pub fn row(list: impl Into<Vec<Layout>>) -> Self
pub fn join(list: impl Into<Vec<Layout>>) -> Self
pub fn apply(l: Layout) -> Self
pub fn item(s: impl Into<String>) -> Self
pub fn space() -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Layout
impl !Send for Layout
impl !Sync for Layout
impl Unpin for Layout
impl !UnwindSafe for Layout
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