Skip to main content

pad

Function pad 

Source
pub fn pad(
    layout: &Layout,
    widths: &[(usize, usize)],
    edge: Edge,
) -> Result<Plan, Error>
Expand description

Pads every axis by (before, after) positions, to the lengths that padded gives. Each position past an end reads by edge: the item type’s fill, or a position on the axis. Existing axis keys remain on their positions. Padding a keyed axis by another mode than Edge::Fill repeats keyed positions, which is an error. An axis that pads by nothing keeps a plain walk.