[][src]Struct glitchconsole::loaders::Loader

pub struct Loader;

A Loader struct to facilitate file manipulation (loading, memorymapping...)

Methods

impl Loader[src]

pub fn copy_file(from: &str, to: &str) -> Result<()>[src]

Copies a file from from to to.

pub fn map_file_mut(name: &str) -> Result<MmapMut>[src]

Constructs a mutable memory map of file at name.

pub fn init_file_mut(from: &str, to: &str) -> Result<MmapMut>[src]

A combination of copy_file and map_file_mut.

pub fn load_file_as_string(name: &str) -> Result<String>[src]

Loads the contents of the file at name and returns it as a String.

Auto Trait Implementations

impl Sync for Loader

impl Send for Loader

impl Unpin for Loader

impl RefUnwindSafe for Loader

impl UnwindSafe for Loader

Blanket Implementations

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

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