[][src]Struct sgx_tstd::sgxfs::SgxFile

pub struct SgxFile { /* fields omitted */ }

A reference to an open file on the filesystem.

An instance of a File can be read and/or written depending on what options it was opened with. Files also implement Seek to alter the logical cursor that the file contains internally.

Files are automatically closed when they go out of scope.


impl SgxFile[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<SgxFile>[src]

Attempts to open a file in read-only mode.

See the OpenOptions::open method for more details.


This function will return an error if path does not already exist. Other errors may also be returned according to OpenOptions::open.

pub fn create<P: AsRef<Path>>(path: P) -> Result<SgxFile>[src]

Opens a file in write-only mode.

This function will create a file if it does not exist, and will truncate it if it does.

pub fn open_ex<P: AsRef<Path>>(
    path: P,
    key: &sgx_key_128bit_t
) -> Result<SgxFile>

pub fn create_ex<P: AsRef<Path>>(
    path: P,
    key: &sgx_key_128bit_t
) -> Result<SgxFile>

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

pub fn clearerr(&self)[src]

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

Trait Implementations

impl Read for SgxFile[src]

impl<'a> Read for &'a SgxFile[src]

impl Seek for SgxFile[src]

impl<'a> Seek for &'a SgxFile[src]

impl Write for SgxFile[src]

impl<'a> Write for &'a SgxFile[src]

Auto Trait Implementations

impl RefUnwindSafe for SgxFile

impl !Send for SgxFile

impl !Sync for SgxFile

impl Unpin for SgxFile

impl UnwindSafe for SgxFile

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.