Skip to main content

Filesystem

Trait Filesystem 

Source
pub trait Filesystem:
    TransactionSink
    + Send
    + Sync
    + 'static {
    // Required methods
    fn queue_tombstone_object(&self, store_object_id: u64, object_id: u64);
    fn tombstone_object<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        store_object_id: u64,
        object_id: u64,
        truncate_guard: Option<&'life1 TruncateGuard<'life2>>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn options(&self) -> &Options;
    fn block_size(&self) -> BlockSize;
    fn get_info(&self) -> Info;
    fn sync<'life0, 'life1, 'async_trait>(
        &'life0 self,
        options: SyncOptions<'life1>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn is_remote(&self) -> bool { ... }
    fn ensure_local(&self) -> &FxFilesystem { ... }
    fn layer_pager(&self) -> Option<&Arc<dyn LayerPager>> { ... }
    fn truncate_guard<'life0, 'async_trait>(
        &'life0 self,
        store_id: u64,
        object_id: u64,
    ) -> Pin<Box<dyn Future<Output = TruncateGuard<'_>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn hooks(&self) -> &Arc<HooksHandle> ⓘ { ... }
}

Required Methods§

Source

fn queue_tombstone_object(&self, store_object_id: u64, object_id: u64)

Queues a graveyard object for tombstoning.

Source

fn tombstone_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, store_object_id: u64, object_id: u64, truncate_guard: Option<&'life1 TruncateGuard<'life2>>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Tombstones a graveyard object synchronously.

Source

fn options(&self) -> &Options

Returns the options used to configure the filesystem.

Source

fn block_size(&self) -> BlockSize

Returns the block size of the underlying device.

Source

fn get_info(&self) -> Info

Returns info about the filesystem.

Source

fn sync<'life0, 'life1, 'async_trait>( &'life0 self, options: SyncOptions<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Syncs the filesystem.

Provided Methods§

Source

fn is_remote(&self) -> bool

Returns true if the filesystem is remote. Some functionality is not supported in this case (e.g. the allocator, graveyard, or journal).

Source

fn ensure_local(&self) -> &FxFilesystem

Returns a reference to the local FxFilesystem instance.

Panics if called on a remote filesystem.

Source

fn layer_pager(&self) -> Option<&Arc<dyn LayerPager>>

Returns the layer pager if one is configured for this filesystem.

Source

fn truncate_guard<'life0, 'async_trait>( &'life0 self, store_id: u64, object_id: u64, ) -> Pin<Box<dyn Future<Output = TruncateGuard<'_>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Takes a truncate guard for the given store and object.

Source

fn hooks(&self) -> &Arc<HooksHandle> ⓘ

Returns the hooks handle for this filesystem.

Implementations§

Source§

impl dyn Filesystem

Source

pub async fn truncate_guard_owned( self: &Arc<Self>, store_id: u64, object_id: u64, ) -> TruncateGuard<'static>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§