Lines Matching refs:T

13 enum DescriptorState<T> {
15 Allocated(Allocation<T>),
18 impl<T> DescriptorState<T> {
50 fn allocate<T>(self, data: Option<T>) -> Allocation<T> { in allocate() argument
58 struct Allocation<T> {
60 data: Option<T>,
63 impl<T> Allocation<T> {
64 fn deallocate(self) -> (Reservation, Option<T>) { in deallocate() argument
72 fn take(&mut self) -> Option<T> { in take() argument
99 struct Range<T> {
102 state: DescriptorState<T>,
105 impl<T> Range<T> {
111 pub(crate) struct RangeAllocator<T> {
112 inner: Impl<T>,
115 enum Impl<T> {
117 Array(ArrayRangeAllocator<T>),
118 Tree(TreeRangeAllocator<T>),
121 impl<T> RangeAllocator<T> {
153 pub(crate) fn reserve_new(&mut self, mut args: ReserveNewArgs<T>) -> Result<ReserveNew<T>> { in reserve_new() argument
245 pub(crate) fn reservation_commit(&mut self, offset: usize, data: &mut Option<T>) -> Result { in reservation_commit()
256 pub(crate) fn reserve_existing(&mut self, offset: usize) -> Result<(usize, usize, Option<T>)> { in reserve_existing() argument
267 pub(crate) fn take_for_each<F: Fn(usize, usize, usize, Option<T>)>(&mut self, callback: F) { in take_for_each()
278 pub(crate) struct ReserveNewArgs<T> {
283 pub(crate) empty_array_alloc: Option<EmptyArrayAlloc<T>>,
284 pub(crate) new_tree_alloc: Option<FromArrayAllocs<T>>,
285 pub(crate) tree_alloc: Option<ReserveNewTreeAlloc<T>>,
289 pub(crate) enum ReserveNew<T> {
290 Success(ReserveNewSuccess<T>),
291 NeedAlloc(ReserveNewNeedAlloc<T>),
295 pub(crate) struct ReserveNewSuccess<T> {
301 _empty_array_alloc: Option<EmptyArrayAlloc<T>>,
302 _new_tree_alloc: Option<FromArrayAllocs<T>>,
303 _tree_alloc: Option<ReserveNewTreeAlloc<T>>,
308 pub(crate) struct ReserveNewNeedAlloc<T> {
309 args: ReserveNewArgs<T>,
315 impl<T> ReserveNewNeedAlloc<T> {
317 pub(crate) fn make_alloc(mut self) -> Result<ReserveNewArgs<T>> { in make_alloc() argument