[−][src]Struct sauron::Http
Provides functions for doing http network request
Implementations
impl Http
[src]
pub fn fetch_with_text_response_decoder<APP, MSG, DE, CB, ERRCB, OUT>(
url: &str,
response_text_decoder: DE,
cb: CB,
err_cb: ERRCB
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
CB: Fn(Result<OUT, Response>) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
DE: Fn(String) -> OUT + Clone + 'static,
ERRCB: Fn(TypeError) -> MSG + Clone + 'static,
OUT: 'static,
[src]
url: &str,
response_text_decoder: DE,
cb: CB,
err_cb: ERRCB
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
CB: Fn(Result<OUT, Response>) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
DE: Fn(String) -> OUT + Clone + 'static,
ERRCB: Fn(TypeError) -> MSG + Clone + '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<APP, MSG, DECODE, ERR>(
url: &str,
text_response_decoder: DECODE,
err_cb: ERR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
DECODE: Fn((u16, String, Headers)) -> MSG + 'static,
ERR: Fn(TypeError) -> MSG + 'static,
[src]
url: &str,
text_response_decoder: DECODE,
err_cb: ERR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
DECODE: Fn((u16, String, Headers)) -> MSG + 'static,
ERR: Fn(TypeError) -> MSG + 'static,
API for fetching http rest request
pub fn fetch_with_request_and_response_decoder<APP, MSG, DECODE, ERR>(
url: &str,
request_init: Option<RequestInit>,
text_response_decoder: DECODE,
err_cb: ERR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
DECODE: Fn((u16, String, Headers)) -> MSG + 'static,
ERR: Fn(TypeError) -> MSG + 'static,
[src]
url: &str,
request_init: Option<RequestInit>,
text_response_decoder: DECODE,
err_cb: ERR
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
DECODE: Fn((u16, String, Headers)) -> MSG + 'static,
ERR: Fn(TypeError) -> MSG + 'static,
API for fetching http rest request err_cb - request failed, in cases where a network is down, server is dead, etc.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Http
[src]
impl Send for Http
[src]
impl Sync for Http
[src]
impl Unpin for Http
[src]
impl UnwindSafe for Http
[src]
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,
pub 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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,