Skip to main content

FileRead

Trait FileRead 

Source
pub trait FileRead:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn file_read(
        &self,
        path: &str,
    ) -> impl Future<Output = Result<Vec<u8>>> + MaybeSend;
}
Expand description

FileRead is used to read the file content entirely in Vec<u8>.

This could be used by Load to load the credential from the file.

Required Methods§

Source

fn file_read( &self, path: &str, ) -> impl Future<Output = Result<Vec<u8>>> + MaybeSend

Read the file content entirely in Vec<u8>.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: FileReadDyn + ?Sized> FileRead for Arc<T>

Source§

async fn file_read(&self, path: &str) -> Result<Vec<u8>>

Implementors§