[][src]Struct gridly::grid::adapters::Transpose

pub struct Transpose<G> { /* fields omitted */ }

Transpose a grid, swapping its rows and columns

Methods

impl<G> Transpose<G>[src]

pub fn transpose(self) -> G[src]

Trait Implementations

impl<G: GridBounds> GridBounds for Transpose<G>[src]

impl<G: BaseGrid> BaseGrid for Transpose<G>[src]

type Item = G::Item

impl<G: PartialEq> PartialEq<Transpose<G>> for Transpose<G>[src]

impl<G: PartialOrd> PartialOrd<Transpose<G>> for Transpose<G>[src]

impl<G: Ord> Ord for Transpose<G>[src]

default fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

default fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<G: Eq> Eq for Transpose<G>[src]

impl<G: Clone> Clone for Transpose<G>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<G: Default> Default for Transpose<G>[src]

impl<G: Hash> Hash for Transpose<G>[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<G: Debug> Debug for Transpose<G>[src]

Auto Trait Implementations

impl<G> Send for Transpose<G> where
    G: Send

impl<G> Sync for Transpose<G> where
    G: Sync

Blanket Implementations

impl<G> GridBoundsExt for G where
    G: GridBounds
[src]

fn num_rows(&self) -> Rows[src]

Get the height of the grid in Rows. This value MUST be const for any given grid. Read more

fn num_columns(&self) -> Columns[src]

Get the width of the grid, in Columns. This value MUST be const for any given grid. Read more

fn dimension<C: VecComponent>(&self) -> C[src]

Get the height or width of this grid.

fn root_row(&self) -> Row[src]

Return the index of the topmost row of this grid. For most grids, this is 0, but some grids may include negatively indexed locations, or even offsets. This value MUST be const for any given grid. Read more

fn root_column(&self) -> Column[src]

Return the index of the leftmost column of this grid. For most grids, this is 0, but some grids may include negatively indexed locations, or even offsets. This value MUST be const for any given grid. Read more

fn root_component<C: LocComponent>(&self) -> C[src]

Return the index of the leftmost row or column of this grid.

Important traits for Range<C>
fn range<C: LocComponent>(&self) -> IndexRange<C>[src]

Get a Range over the row or column indexes

fn row_range(&self) -> RowRange[src]

A range iterator over all the column indexes in this grid

fn column_range(&self) -> ColumnRange[src]

A range iterator over all the row indexes in this grid

fn check_component<C: LocComponent>(&self, c: C) -> Result<C, RangeError<C>>[src]

Check that a Row or a Column is inside the bounds described by this Grid.

fn component_in_bounds<C: LocComponent>(&self, c: C) -> bool[src]

fn check_location(
    &self,
    loc: impl Into<Location>
) -> Result<Location, LocationRangeError>
[src]

Check that a location is inside the bounds of this grid. Read more

fn location_in_bounds(&self, location: impl Into<Location>) -> bool[src]

Returns true if a locaton is inside the bounds of this grid.

impl<G> Grid for G where
    G: BaseGrid
[src]

fn get(
    &self,
    location: impl Into<Location>
) -> Result<&Self::Item, LocationRangeError>
[src]

Get a reference to a cell in a grid. Returns an error if the location is out of bounds with the specific boundary violation. Read more

fn view<T: LocComponent>(&self) -> View<Self, T>[src]

fn rows(&self) -> RowsView<Self>[src]

Get a view of a grid's rows

fn columns(&self) -> ColumnsView<Self>[src]

Get a view of a grid's columns

unsafe fn single_view_unchecked<T: LocComponent>(
    &self,
    index: T
) -> SingleView<Self, T>
[src]

Get a view of a single row or column in a grid, without bounds checking that row or column index. Read more

unsafe fn row_unchecked(&self, row: impl Into<Row>) -> RowView<Self>[src]

Get a view of a single row in a grid, without bounds checking that row's index

unsafe fn column_unchecked(&self, column: impl Into<Column>) -> ColumnView<Self>[src]

Get a view of a single column in a grid, without bounds checking that column's index

fn single_view<T: LocComponent>(
    &self,
    index: T
) -> Result<SingleView<Self, T>, RangeError<T>>
[src]

Get a view of a single row or column in a grid. Returns an error if the index of the row or column is out of bounds for the grid. Read more

fn row(&self, row: impl Into<Row>) -> Result<RowView<Self>, RowRangeError>[src]

Get a view of a single row in a grid. Returns an error if the index of the row is out of bounds for the grid. Read more

fn column(
    &self,
    column: impl Into<Column>
) -> Result<ColumnView<Self>, ColumnRangeError>
[src]

Get a view of a single column in a grid. Returns an error if the index of the column is out of bounds for the grid. Read more

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.