Skip to main content

FileRead

Trait FileRead 

pub trait FileRead:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn file_read(
        &self,
        path: &str,
    ) -> impl Future<Output = Result<Vec<u8>, Error>> + MaybeSend;
}
Available on crate feature reqsign only.
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§

fn file_read( &self, path: &str, ) -> impl Future<Output = Result<Vec<u8>, Error>> + 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".

Implementations on Foreign Types§

§

impl FileRead for TokioFileRead

Available on non-target_family=wasm only.
§

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

§

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

§

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

Implementors§