Enum sandbox_ipc::io::SendableDataSource[][src]

pub enum SendableDataSource {
    File(File),
    Memory(SharedMem),
    Inline(Vec<u8>),
}

A source of data can be sent to other processes over a MessageChannel or similar mechanism. It may consist of a file handle, shared memory, or inline data.

Variants

Methods

impl SendableDataSource
[src]

Converts the SendableDataSource into an appropriate std::io::Read implementation.

Converts the SendableDataSource into a in-memory byte array.

If the data source is a file, this will read the entirety of it to memory at once. Use to_read if you need only streaming access to the data.

Trait Implementations

impl Debug for SendableDataSource
[src]

Formats the value using the given formatter. Read more

impl From<Vec<u8>> for SendableDataSource
[src]

Performs the conversion.

impl From<File> for SendableDataSource
[src]

Performs the conversion.

Auto Trait Implementations