Struct range_alloc::RangeAllocator[][src]

pub struct RangeAllocator<T> { /* fields omitted */ }

Implementations

impl<T> RangeAllocator<T> where
    T: Clone + Copy + Add<Output = T> + AddAssign + Sub<Output = T> + Eq + PartialOrd + Debug
[src]

pub fn new(range: Range<T>) -> Self[src]

pub fn initial_range(&self) -> &Range<T>[src]

pub fn allocate_range(
    &mut self,
    length: T
) -> Result<Range<T>, RangeAllocationError<T>>
[src]

pub fn free_range(&mut self, range: Range<T>)[src]

pub fn allocated_ranges<'a>(&'a self) -> impl 'a + Iterator<Item = Range<T>>[src]

Returns an iterator over allocated non-empty ranges

pub fn reset(&mut self)[src]

pub fn is_empty(&self) -> bool[src]

impl<T: Copy + Sub<Output = T> + Sum> RangeAllocator<T>[src]

pub fn total_available(&self) -> T[src]

Trait Implementations

impl<T: Debug> Debug for RangeAllocator<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RangeAllocator<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for RangeAllocator<T> where
    T: Send
[src]

impl<T> Sync for RangeAllocator<T> where
    T: Sync
[src]

impl<T> Unpin for RangeAllocator<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for RangeAllocator<T> where
    T: UnwindSafe
[src]

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.