pub struct Block { /* private fields */ }Implementations§
Source§impl Block
impl Block
Sourcepub fn rectangle(width: usize, height: usize) -> Self
pub fn rectangle(width: usize, height: usize) -> Self
Width/Height are restricted to the range [1, MAX_RECTANGLE_EDGE].
pub fn diagonal(width: usize) -> Self
Sourcepub fn elle(width: usize, height: usize) -> Self
pub fn elle(width: usize, height: usize) -> Self
Width/Height are restricted to the range [MIN_ELLE_EDGE, MAX_ELLE_EDGE].
pub fn coordinates(&self) -> &Vec<Point>
pub fn coordinates_mut(&mut self) -> &mut Vec<Point>
pub fn dimensions(&self) -> Dimension
Sourcepub fn rotate_right(&mut self) -> &mut Self
pub fn rotate_right(&mut self) -> &mut Self
Rotate 90 degrees to the right about the origin.
Sourcepub fn rotate_left(&mut self) -> &mut Self
pub fn rotate_left(&mut self) -> &mut Self
Rotate 90 degrees to the left about the origin.
Trait Implementations§
Source§impl Distribution<Block> for StandardUniform
impl Distribution<Block> for StandardUniform
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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