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>>>>;
fn byte_stream(
&self,
) -> Pin<Box<dyn Stream<Item = Result<Bytes, CapturedError>> + Send>>;
fn read_string(
&self,
) -> Pin<Box<dyn Future<Output = Result<String, CapturedError>>>>;
fn inner(&self) -> &(dyn Any + 'static);
}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>>>>
fn byte_stream( &self, ) -> Pin<Box<dyn Stream<Item = Result<Bytes, CapturedError>> + Send>>
fn read_string( &self, ) -> Pin<Box<dyn Future<Output = Result<String, CapturedError>>>>
fn inner(&self) -> &(dyn Any + 'static)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".