Struct paragraph::Item
[−]
[src]
pub struct Item { pub t: Type, pub w: f32, pub y: f32, pub z: f32, pub p: f32, pub f: bool, }
An item.
Fields
t: Type
The type.
w: f32
The width.
y: f32
The stretchability.
z: f32
The shrinkability.
p: f32
The penalty.
f: bool
The flag.
Methods
impl Item
[src]
fn new(t: Type, w: f32, y: f32, z: f32, p: f32, f: bool) -> Item
Create an item.
fn new_box(w: f32) -> Item
Create a box item.
fn new_glue(w: f32, y: f32, z: f32) -> Item
Create a glue item.
fn new_penalty(w: f32, p: f32, f: bool) -> Item
Create a penalty item.
fn is_box(&self) -> bool
Check if it is a box item.
fn is_glue(&self) -> bool
Check if it is a glue item.
fn is_penalty(&self) -> bool
Check if it is a penalty item.
Trait Implementations
impl Clone for Item
[src]
fn clone(&self) -> Item
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more