[][src]Struct range_alloc::RangeAllocator

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


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

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>>

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

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

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

impl<T> Unpin for RangeAllocator<T> where
    T: Unpin

impl<T> UnwindSafe for RangeAllocator<T> where
    T: UnwindSafe

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.