[−][src]Struct sauron::Http
Provides functions for doing http network request
Implementations
impl Http
[src]
pub fn fetch_with_text_response_decoder<DE, CB, OUT, APP, MSG>(
url: &str,
response_text_decoder: DE,
cb: CB
) -> Cmd<Program<APP, MSG>> where
APP: Component<MSG> + 'static,
CB: Fn(Result<OUT, JsValue>) -> MSG + Clone + 'static,
DE: Fn(String) -> OUT + Clone + 'static,
MSG: 'static,
OUT: 'static,
[src]
url: &str,
response_text_decoder: DE,
cb: CB
) -> Cmd<Program<APP, MSG>> where
APP: Component<MSG> + 'static,
CB: Fn(Result<OUT, JsValue>) -> MSG + Clone + 'static,
DE: Fn(String) -> OUT + Clone + 'static,
MSG: 'static,
OUT: 'static,
fetch text document from the url and decode the result with the supplied response_text_decoder function
pub fn fetch_with_response_decoder<F, ERR, APP, MSG>(
url: &str,
response_decoder: F,
fail_cb: ERR
) -> Cmd<Program<APP, MSG>> where
APP: Component<MSG> + 'static,
ERR: Fn(JsValue) -> MSG + 'static,
F: Fn(JsValue) -> MSG + 'static,
MSG: 'static,
[src]
url: &str,
response_decoder: F,
fail_cb: ERR
) -> Cmd<Program<APP, MSG>> where
APP: Component<MSG> + 'static,
ERR: Fn(JsValue) -> MSG + 'static,
F: Fn(JsValue) -> MSG + 'static,
MSG: 'static,
API for fetching http rest request
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl UnwindSafe for Http
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,