[−][src]Struct tokio_fs::OpenOptions
Options and flags which can be used to configure how a file is opened.
This is a specialized version of std::fs::OpenOptions for usage from
the Tokio runtime.
From<std::fs::OpenOptions> is implemented for more advanced configuration
than the methods provided here.
Methods
impl OpenOptions[src]
impl OpenOptionspub fn new() -> OpenOptions[src]
pub fn new() -> OpenOptionsCreates a blank new set of options ready for configuration.
All options are initially set to false.
Examples
use tokio::fs::OpenOptions; let mut options = OpenOptions::new(); let future = options.read(true).open("foo.txt");
pub fn read(&mut self, read: bool) -> &mut OpenOptions[src]
pub fn read(&mut self, read: bool) -> &mut OpenOptionsSee the underlying read call for details.
pub fn write(&mut self, write: bool) -> &mut OpenOptions[src]
pub fn write(&mut self, write: bool) -> &mut OpenOptionsSee the underlying write call for details.
pub fn append(&mut self, append: bool) -> &mut OpenOptions[src]
pub fn append(&mut self, append: bool) -> &mut OpenOptionsSee the underlying append call for details.
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptions[src]
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptionsSee the underlying truncate call for details.
pub fn create(&mut self, create: bool) -> &mut OpenOptions[src]
pub fn create(&mut self, create: bool) -> &mut OpenOptionsSee the underlying create call for details.
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptions[src]
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptionsSee the underlying create_new call for details.
pub fn open<P>(&self, path: P) -> OpenFuture<P> where
P: AsRef<Path> + Send + 'static, [src]
pub fn open<P>(&self, path: P) -> OpenFuture<P> where
P: AsRef<Path> + Send + 'static, Trait Implementations
impl Clone for OpenOptions[src]
impl Clone for OpenOptionsfn clone(&self) -> OpenOptions[src]
fn clone(&self) -> OpenOptionsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl From<OpenOptions> for OpenOptions[src]
impl From<OpenOptions> for OpenOptionsfn from(options: StdOpenOptions) -> OpenOptions[src]
fn from(options: StdOpenOptions) -> OpenOptionsPerforms the conversion.
impl Debug for OpenOptions[src]
impl Debug for OpenOptionsAuto Trait Implementations
impl Send for OpenOptions
impl Send for OpenOptionsimpl Sync for OpenOptions
impl Sync for OpenOptionsBlanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more