NativeFileData

Trait NativeFileData 

Source
pub trait NativeFileData: Send + Sync {
    // Required methods
    fn name(&self) -> String;
    fn size(&self) -> u64;
    fn last_modified(&self) -> u64;
    fn path(&self) -> PathBuf;
    fn content_type(&self) -> Option<String>;
    fn read_bytes(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, CapturedError>> + 'static>>;
    fn byte_stream(
        &self,
    ) -> Pin<Box<dyn Stream<Item = Result<Bytes, CapturedError>> + Send + 'static>>;
    fn read_string(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<String, CapturedError>> + 'static>>;
    fn inner(&self) -> &dyn Any;
}

Required Methods§

Source

fn name(&self) -> String

Source

fn size(&self) -> u64

Source

fn last_modified(&self) -> u64

Source

fn path(&self) -> PathBuf

Source

fn content_type(&self) -> Option<String>

Source

fn read_bytes( &self, ) -> Pin<Box<dyn Future<Output = Result<Bytes, CapturedError>> + 'static>>

Source

fn byte_stream( &self, ) -> Pin<Box<dyn Stream<Item = Result<Bytes, CapturedError>> + Send + 'static>>

Source

fn read_string( &self, ) -> Pin<Box<dyn Future<Output = Result<String, CapturedError>> + 'static>>

Source

fn inner(&self) -> &dyn Any

Implementors§