Struct tetsy_fetch::client::Abort[][src]

pub struct Abort { /* fields omitted */ }

A handle to abort requests.

Requests are either aborted based on reaching thresholds such as maximum response size, timeouts or too many redirects, or else they can be aborted explicitly by the calling code.

Implementations

impl Abort[src]

pub fn is_aborted(&self) -> bool[src]

True if abort has been invoked.

pub fn max_size(&self) -> usize[src]

The maximum response body size.

pub fn max_duration(&self) -> Duration[src]

The maximum total time, including redirects.

pub fn max_redirects(&self) -> usize[src]

The maximum number of redirects to allow.

pub fn abort(&self)[src]

Mark as aborted.

pub fn with_max_size(self, n: usize) -> Abort[src]

Set the maximum reponse body size.

pub fn with_max_duration(self, d: Duration) -> Abort[src]

Set the maximum duration (including redirects).

pub fn with_max_redirects(self, n: usize) -> Abort[src]

Set the maximum number of redirects to follow.

Trait Implementations

impl Clone for Abort[src]

impl Debug for Abort[src]

impl Default for Abort[src]

impl From<Arc<AtomicBool>> for Abort[src]

Auto Trait Implementations

impl RefUnwindSafe for Abort

impl Send for Abort

impl Sync for Abort

impl Unpin for Abort

impl UnwindSafe for Abort

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.