[][src]Struct ggez::filesystem::OpenOptions

#[must_use]
pub struct OpenOptions { /* fields omitted */ }

Options for opening files

We need our own version of this structure because the one in std annoyingly doesn't let you read the read/write/create/etc state out of it.

Methods

impl OpenOptions[src]

pub fn new() -> OpenOptions[src]

Create a new instance

pub fn read(self, read: bool) -> OpenOptions[src]

Open for reading

pub fn write(self, write: bool) -> OpenOptions[src]

Open for writing

pub fn create(self, create: bool) -> OpenOptions[src]

Create the file if it does not exist yet

pub fn append(self, append: bool) -> OpenOptions[src]

Append at the end of the file

pub fn truncate(self, truncate: bool) -> OpenOptions[src]

Truncate the file to 0 bytes after opening

Trait Implementations

impl PartialEq<OpenOptions> for OpenOptions[src]

impl Clone for OpenOptions[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for OpenOptions[src]

impl Copy for OpenOptions[src]

impl Debug for OpenOptions[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Erased for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.