[][src]Struct rocket_include_static_resources::FileResources

pub struct FileResources { /* fields omitted */ }

Reloadable file resources.

Methods

impl FileResources[src]

pub fn new() -> FileResources[src]

Create an instance of FileResources.

pub fn register_resource_file<P: Into<PathBuf>>(
    &mut self,
    name: &'static str,
    file_path: P
) -> Result<(), Error>
[src]

Register a resource from a path and it can be reloaded automatically.

pub fn unregister_resource_file<S: AsRef<str>>(
    &mut self,
    name: S
) -> Option<PathBuf>
[src]

Unregister a resource from a file by a name.

pub fn reload_if_needed(&mut self) -> Result<(), Error>[src]

Reload resources if needed.

pub fn get_resource<S: AsRef<str>>(
    &mut self,
    name: S,
    reload_if_needed: bool
) -> Result<(&Mime, Arc<Vec<u8>>, &EntityTag), Error>
[src]

Get the specific resource.

Trait Implementations

impl Default for FileResources[src]

impl Debug for FileResources[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Typeable for T where
    T: Any

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,