Enum sandbox_ipc::io::SendableDataSource [−][src]
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
File(File)
Memory(SharedMem)
Inline(Vec<u8>)
Methods
impl SendableDataSource
[src]
impl SendableDataSource
pub fn to_read(self) -> Result<SendableDataSourceReader>
[src]
pub fn to_read(self) -> Result<SendableDataSourceReader>
Converts the SendableDataSource
into an appropriate std::io::Read
implementation.
pub fn to_bytes(self) -> Result<SendableDataSourceBytes>
[src]
pub fn to_bytes(self) -> Result<SendableDataSourceBytes>
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]
impl Debug for SendableDataSource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Vec<u8>> for SendableDataSource
[src]
impl From<Vec<u8>> for SendableDataSource
impl From<File> for SendableDataSource
[src]
impl From<File> for SendableDataSource
Auto Trait Implementations
impl Send for SendableDataSource
impl Send for SendableDataSource
impl Sync for SendableDataSource
impl Sync for SendableDataSource