Skip to main content

PuffinFileAccessor

Trait PuffinFileAccessor 

Source
pub trait PuffinFileAccessor:
    Send
    + Sync
    + 'static {
    type Reader: SizeAwareRangeReader + Sync;
    type Writer: AsyncWrite + Unpin + Send;
    type FileHandle: ToString + Clone + Send + Sync;

    // Required methods
    fn reader<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handle: &'life1 Self::FileHandle,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Reader>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn writer<'life0, 'life1, 'async_trait>(
        &'life0 self,
        handle: &'life1 Self::FileHandle,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Writer>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

PuffinFileAccessor is for opening readers and writers for puffin files.

Required Associated Types§

Source

type Reader: SizeAwareRangeReader + Sync

Source

type Writer: AsyncWrite + Unpin + Send

Source

type FileHandle: ToString + Clone + Send + Sync

Required Methods§

Source

fn reader<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 Self::FileHandle, ) -> Pin<Box<dyn Future<Output = Result<Self::Reader>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Opens a reader for the given puffin file handle.

Source

fn writer<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 Self::FileHandle, ) -> Pin<Box<dyn Future<Output = Result<Self::Writer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a writer for the given puffin file handle.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: PuffinFileAccessor + ?Sized> PuffinFileAccessor for Arc<T>
where Arc<T>: Send + Sync + 'static,

Source§

type Reader = <T as PuffinFileAccessor>::Reader

Source§

type Writer = <T as PuffinFileAccessor>::Writer

Source§

type FileHandle = <T as PuffinFileAccessor>::FileHandle

Source§

fn reader<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 Self::FileHandle, ) -> Pin<Box<dyn Future<Output = Result<Self::Reader>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn writer<'life0, 'life1, 'async_trait>( &'life0 self, handle: &'life1 Self::FileHandle, ) -> Pin<Box<dyn Future<Output = Result<Self::Writer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§