Struct sgx_tprotected_fs::OpenOptions
source · [−]pub struct OpenOptions(_);
Expand description
Options and flags which can be used to configure how a file is opened.
This builder exposes the ability to configure how a SgxFile is opened and what operations are permitted on the open file. The SgxFile::open and SgxFile::create methods are aliases for commonly used options using this builder.
Implementations
sourceimpl OpenOptions
impl OpenOptions
sourcepub fn new() -> OpenOptions
pub fn new() -> OpenOptions
Creates a blank new set of options ready for configuration.
sourcepub fn read(&mut self, read: bool) -> &mut OpenOptions
pub fn read(&mut self, read: bool) -> &mut OpenOptions
Sets the option for read access.
sourcepub fn write(&mut self, write: bool) -> &mut OpenOptions
pub fn write(&mut self, write: bool) -> &mut OpenOptions
Sets the option for write access.
sourcepub fn append(&mut self, append: bool) -> &mut OpenOptions
pub fn append(&mut self, append: bool) -> &mut OpenOptions
Sets the option for the append mode.
sourcepub fn update(&mut self, update: bool) -> &mut OpenOptions
pub fn update(&mut self, update: bool) -> &mut OpenOptions
Sets the option for update a previous file.
sourcepub fn binary(&mut self, binary: bool) -> &mut OpenOptions
pub fn binary(&mut self, binary: bool) -> &mut OpenOptions
Sets the option for binary a file.
pub fn open_with_key<P: AsRef<Path>>(
&self,
path: P,
key: Key128bit
) -> Result<SgxFile>
pub fn open_integrity_only<P: AsRef<Path>>(&self, path: P) -> Result<SgxFile>
pub fn open_with<P: AsRef<Path>>(
&self,
path: P,
encrypt_mode: EncryptMode,
cache_size: Option<usize>
) -> Result<SgxFile>
Trait Implementations
sourceimpl Clone for OpenOptions
impl Clone for OpenOptions
sourcefn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for OpenOptions
impl Debug for OpenOptions
Auto Trait Implementations
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more