Trait InodeAllocator

Source
pub trait InodeAllocator {
    type Error;

    // Required method
    fn allocate<'life0, 'async_trait>(
        &'life0 mut self,
        n: usize,
    ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn allocate<'life0, 'async_trait>( &'life0 mut self, n: usize, ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reserve a continuous number of inodes, returning the start. The range is disjoint from the previously allocated ones.

Implementations on Foreign Types§

Source§

impl InodeAllocator for ()

Source§

type Error = Error

Source§

fn allocate<'life0, 'async_trait>( &'life0 mut self, _n: usize, ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl InodeAllocator for Range<u64>

Source§

type Error = Error

Source§

fn allocate<'life0, 'async_trait>( &'life0 mut self, n: usize, ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<A: InodeAllocator + Send + Sync> InodeAllocator for Arc<Mutex<A>>

Source§

type Error = <A as InodeAllocator>::Error

Source§

fn allocate<'life0, 'async_trait>( &'life0 mut self, n: usize, ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§