Skip to main content

IntoFileAccess

Trait IntoFileAccess 

Source
pub trait IntoFileAccess:
    Send
    + Unpin
    + 'static {
    type Output: FileAccess;

    // Required method
    fn into_file_access(self) -> Self::Output;
}
Expand description

Trait that converts a file handle into something that implements FileAccess.

This trait is called when streaming starts, and exists as a separate step so that buffer allocation doesn’t have to happen until that point.

Required Associated Types§

Source

type Output: FileAccess

Target type that implements FileAccess.

Required Methods§

Source

fn into_file_access(self) -> Self::Output

Convert into a type that implements FileAccess.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IntoFileAccess for Cursor<Bytes>

Source§

impl IntoFileAccess for File

Implementors§