Struct csx64::exec::fs::MemoryFile[][src]

pub struct MemoryFile {
    pub content: Arc<Mutex<Cursor<Vec<u8>>>>,
    pub readable: bool,
    pub writable: bool,
    pub seekable: bool,
    pub interactive: bool,
}

Represents a file that is stored entirely in memory.

The data is backed by a Cursor<Vec<u8>>, which is stored via Arc<Mutex<T>> so that it can be access externally, even across threads. The readable, writable, and seekable fields control client-level file permissions.

The interactive field should be set to true if additional data may be added to content, and otherwise should be false. interactive should never transition from false to true. If an interactive file later becomes non-interactive (e.g. forced EOF), then interactive should transition from true to false.

Fields

content: Arc<Mutex<Cursor<Vec<u8>>>>readable: boolwritable: boolseekable: boolinteractive: bool

Trait Implementations

impl FileHandle for MemoryFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Az for T[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedAs for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> SaturatingAs for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnwrappedAs for T[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WrappingAs for T[src]