Struct range_alloc::RangeAllocator [−][src]
Implementations
impl<T> RangeAllocator<T> where
T: Clone + Copy + Add<Output = T> + AddAssign + Sub<Output = T> + Eq + PartialOrd + Debug, [src]
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>>[src]
&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
Auto Trait Implementations
impl<T> RefUnwindSafe for RangeAllocator<T> where
T: RefUnwindSafe, [src]
T: RefUnwindSafe,
impl<T> Send for RangeAllocator<T> where
T: Send, [src]
T: Send,
impl<T> Sync for RangeAllocator<T> where
T: Sync, [src]
T: Sync,
impl<T> Unpin for RangeAllocator<T> where
T: Unpin, [src]
T: Unpin,
impl<T> UnwindSafe for RangeAllocator<T> where
T: UnwindSafe, [src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,