Struct rect_iter::RectRange [] [src]

pub struct RectRange<T: Num + PartialOrd> { /* fields omitted */ }

RectRange is rectangle representation using std::ops::Range.

Diffrent from Range, RectRange itself isn't a iterator, but has IntoIterator implementation and iter method(with 'clone').

Methods

impl<T: Num + PartialOrd> RectRange<T>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<T: Num + PartialOrd + Clone> RectRange<T>
[src]

[src]

get x range

[src]

get y range

[src]

slide range by the given point

[src]

slide start point without checking

[src]

slide end point without checking

[src]

the length in the x-axis deirection

[src]

the length of in the y-axis deirection

[src]

judges if 2 ranges have intersection

[src]

gets the intersection of 2 ranges

[src]

get the upper left corner(inclusive)

[src]

get the upper right corner(inclusive)

[src]

get the lower left corner(inclusive)

[src]

get the lower right corner(inclusive)

impl<T: Num + PartialOrd + Copy> RectRange<T>
[src]

[src]

[src]

[src]

Important traits for RectIter<T>
[src]

[src]

impl<T: Num + PartialOrd + ToPrimitive + Copy> RectRange<T>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<T: Num + PartialOrd + Copy + FromPrimitive + ToPrimitive> RectRange<T>
[src]

[src]

returns self.xlen * self.ylen as usize

[src]

return 'nth' element same as RectIter::nth, but much faster(O(1))

Trait Implementations

impl<T: Clone + Num + PartialOrd> Clone for RectRange<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Num + PartialOrd> Debug for RectRange<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq + Num + PartialOrd> PartialEq for RectRange<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq + Num + PartialOrd> Eq for RectRange<T>
[src]

impl<T: Hash + Num + PartialOrd> Hash for RectRange<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

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

impl<T: Num + PartialOrd + Copy> IntoIterator for RectRange<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<T> Send for RectRange<T> where
    T: Send

impl<T> Sync for RectRange<T> where
    T: Sync