[][src]Struct include_dir::File

pub struct File<'a> { /* fields omitted */ }

A file with its contents stored in a &'static [u8].

Methods

impl<'a> File<'a>[src]

pub fn path(&self) -> &'a Path[src]

The file's path, relative to the directory included with include_dir!().

pub fn contents(&self) -> &'a [u8][src]

The file's raw contents.

pub fn contents_utf8(&self) -> Option<&'a str>[src]

The file's contents interpreted as a string.

Trait Implementations

impl<'a> Clone for File<'a>[src]

impl<'a> Copy for File<'a>[src]

impl<'a> PartialEq<File<'a>> for File<'a>[src]

impl<'a> Debug for File<'a>[src]

impl<'a> StructuralPartialEq for File<'a>[src]

Auto Trait Implementations

impl<'a> Send for File<'a>

impl<'a> Sync for File<'a>

impl<'a> Unpin for File<'a>

impl<'a> UnwindSafe for File<'a>

impl<'a> RefUnwindSafe for File<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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> 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]