[][src]Trait loader_rs::LoaderTrait

pub trait LoaderTrait<T, FE>: Default + LoaderInternal<T, FE> where
    LoaderError<FE>: From<FE>, 
{ fn load_from_bytes(content: &[u8]) -> Result<T, LoaderError<FE>>
    where
        Self: Sized
; fn load_from_string(content: &str) -> Result<T, LoaderError<FE>>
    where
        Self: Sized
, { ... }
fn load<R: AsRef<str>>(&self, url: R) -> Result<Arc<T>, LoaderError<FE>> { ... }
fn load_with_timeout<R: AsRef<str>>(
        &self,
        url: R,
        timeout: Duration
    ) -> Result<Arc<T>, LoaderError<FE>> { ... }
fn get_or_fetch_with_result<F: FnOnce(&Url) -> Result<T, LoaderError<FE>>>(
        &self,
        key: &Url,
        fetcher: F
    ) -> Result<Arc<T>, LoaderError<FE>> { ... } }

Required methods

fn load_from_bytes(content: &[u8]) -> Result<T, LoaderError<FE>> where
    Self: Sized

Loading content...

Provided methods

fn load_from_string(content: &str) -> Result<T, LoaderError<FE>> where
    Self: Sized

fn load<R: AsRef<str>>(&self, url: R) -> Result<Arc<T>, LoaderError<FE>>

fn load_with_timeout<R: AsRef<str>>(
    &self,
    url: R,
    timeout: Duration
) -> Result<Arc<T>, LoaderError<FE>>

fn get_or_fetch_with_result<F: FnOnce(&Url) -> Result<T, LoaderError<FE>>>(
    &self,
    key: &Url,
    fetcher: F
) -> Result<Arc<T>, LoaderError<FE>>

Loading content...

Implementors

impl LoaderTrait<RustType, ()> for Loader<RustType, ()>[src]

impl LoaderTrait<Value, Error> for Loader<Value, Error>[src]

impl LoaderTrait<Value, Error> for Loader<Value, Error>[src]

impl LoaderTrait<JsonValue, Error> for Loader<JsonValue, Error>[src]

Loading content...