[][src]Struct tempfile::SpooledTempFile

pub struct SpooledTempFile { /* fields omitted */ }

An object that behaves like a regular temporary file, but keeps data in memory until it reaches a configured size, at which point the data is written to a temporary file on disk, and further operations use the file on disk.

Implementations

impl SpooledTempFile[src]

pub fn new(max_size: usize) -> SpooledTempFile

Notable traits for SpooledTempFile

impl Read for SpooledTempFileimpl Write for SpooledTempFile
[src]

pub fn is_rolled(&self) -> bool[src]

Returns true if the file has been rolled over to disk.

pub fn roll(&mut self) -> Result<()>[src]

Rolls over to a file on disk, regardless of current size. Does nothing if already rolled over.

pub fn set_len(&mut self, size: u64) -> Result<(), Error>[src]

Trait Implementations

impl Debug for SpooledTempFile[src]

impl Read for SpooledTempFile[src]

impl Seek for SpooledTempFile[src]

impl Write for SpooledTempFile[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,