Trait surf_n_term::surface::ViewBounds[][src]

pub trait ViewBounds {
    fn view_bounds(self, size: usize) -> Option<(usize, usize)>;
}

Everything that can be intepreted as a view bounds.

Required methods

fn view_bounds(self, size: usize) -> Option<(usize, usize)>[src]

Resolve bounds the same way python numpy does for ranges when indexing ndarrays

Returns tuple with indices of the first element and the last + 1 element.

Loading content...

Implementations on Foreign Types

impl ViewBounds for RangeFull[src]

impl ViewBounds for i8[src]

impl ViewBounds for i16[src]

impl ViewBounds for i32[src]

impl ViewBounds for i64[src]

impl ViewBounds for isize[src]

impl ViewBounds for u8[src]

impl ViewBounds for u16[src]

impl ViewBounds for u32[src]

impl ViewBounds for u64[src]

impl ViewBounds for usize[src]

impl ViewBounds for Range<u8>[src]

impl ViewBounds for RangeFrom<u8>[src]

impl ViewBounds for RangeTo<u8>[src]

impl ViewBounds for RangeInclusive<u8>[src]

impl ViewBounds for RangeToInclusive<u8>[src]

impl ViewBounds for Range<i8>[src]

impl ViewBounds for RangeFrom<i8>[src]

impl ViewBounds for RangeTo<i8>[src]

impl ViewBounds for RangeInclusive<i8>[src]

impl ViewBounds for RangeToInclusive<i8>[src]

impl ViewBounds for Range<u16>[src]

impl ViewBounds for RangeFrom<u16>[src]

impl ViewBounds for RangeTo<u16>[src]

impl ViewBounds for RangeInclusive<u16>[src]

impl ViewBounds for RangeToInclusive<u16>[src]

impl ViewBounds for Range<i16>[src]

impl ViewBounds for RangeFrom<i16>[src]

impl ViewBounds for RangeTo<i16>[src]

impl ViewBounds for RangeInclusive<i16>[src]

impl ViewBounds for RangeToInclusive<i16>[src]

impl ViewBounds for Range<u32>[src]

impl ViewBounds for RangeFrom<u32>[src]

impl ViewBounds for RangeTo<u32>[src]

impl ViewBounds for RangeInclusive<u32>[src]

impl ViewBounds for RangeToInclusive<u32>[src]

impl ViewBounds for Range<i32>[src]

impl ViewBounds for RangeFrom<i32>[src]

impl ViewBounds for RangeTo<i32>[src]

impl ViewBounds for RangeInclusive<i32>[src]

impl ViewBounds for RangeToInclusive<i32>[src]

impl ViewBounds for Range<u64>[src]

impl ViewBounds for RangeFrom<u64>[src]

impl ViewBounds for RangeTo<u64>[src]

impl ViewBounds for RangeInclusive<u64>[src]

impl ViewBounds for RangeToInclusive<u64>[src]

impl ViewBounds for Range<i64>[src]

impl ViewBounds for RangeFrom<i64>[src]

impl ViewBounds for RangeTo<i64>[src]

impl ViewBounds for RangeInclusive<i64>[src]

impl ViewBounds for RangeToInclusive<i64>[src]

impl ViewBounds for Range<usize>[src]

impl ViewBounds for RangeFrom<usize>[src]

impl ViewBounds for RangeTo<usize>[src]

impl ViewBounds for RangeInclusive<usize>[src]

impl ViewBounds for RangeToInclusive<usize>[src]

impl ViewBounds for Range<isize>[src]

impl ViewBounds for RangeFrom<isize>[src]

impl ViewBounds for RangeTo<isize>[src]

impl ViewBounds for RangeInclusive<isize>[src]

impl ViewBounds for RangeToInclusive<isize>[src]

Loading content...

Implementors

Loading content...