logo
pub struct OpenOptions { /* private fields */ }
Expand description

Re-export these to allow them to be used with Reuse. Options and flags which can be used to configure how a file is opened.

This corresponds to std::fs::OpenOptions.

This OpenOptions has no open method. To open a file with an OptionOptions, first obtain a Dir containing the path, and then call Dir::open_with.

We need to define our own version because the libstd `OpenOptions` doesn't have public accessors that we can use.

Implementations

Re-export these to allow them to be used with Reuse.

Creates a blank new set of options ready for configuration.

This corresponds to std::fs::OpenOptions::new.

Sets the option for read access.

This corresponds to std::fs::OpenOptions::read.

Sets the option for write access.

This corresponds to std::fs::OpenOptions::write.

Sets the option for the append mode.

This corresponds to std::fs::OpenOptions::append.

Sets the option for truncating a previous file.

This corresponds to std::fs::OpenOptions::truncate.

Sets the option to create a new file.

This corresponds to std::fs::OpenOptions::create.

Sets the option to always create a new file.

This corresponds to std::fs::OpenOptions::create_new.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Sets the mode bits that a new file will be created with. Read more

Pass custom flags to the flags argument of open. Read more

Sets the option for following symlinks in the last component of a path. Read more

Sets the option for disabling an error that might be generated by the opened object being a directory. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.