pub struct SendOptions {
pub redirects: RedirectPolicy,
pub connect_timeout: Option<Duration>,
pub first_byte_timeout: Option<Duration>,
pub between_bytes_timeout: Option<Duration>,
}Expand description
The host’s HTTP client, which a request and its body go through. How a request follows redirects and how long each step of it may take.
The three timeouts are WASI 0.3’s request-options: how long connecting may take, how long
the first byte of the response body may take after the head, and how long the gap between
bytes of the body may take. Each None means no limit, as WASI’s does.
Fields§
§redirects: RedirectPolicyWhich redirects the client follows.
connect_timeout: Option<Duration>WASI connect-timeout: how long the initial connection to the server may take.
first_byte_timeout: Option<Duration>WASI first-byte-timeout: how long the first byte of the response body may take after
the response head arrived.
between_bytes_timeout: Option<Duration>WASI between-bytes-timeout: how long the gap between one piece of the response body and
the next may take.
Implementations§
Source§impl SendOptions
impl SendOptions
Sourcepub const fn new() -> SendOptions
pub const fn new() -> SendOptions
Follow up to five redirects, and let every step take as long as the platform does.
Sourcepub fn redirects(self, redirects: RedirectPolicy) -> SendOptions
pub fn redirects(self, redirects: RedirectPolicy) -> SendOptions
Dart HttpClient.maxRedirects = max: how many redirects to follow.
Sourcepub fn connect_timeout(self, timeout: Duration) -> SendOptions
pub fn connect_timeout(self, timeout: Duration) -> SendOptions
WASI connect-timeout: how long the initial connection may take.
Sourcepub fn first_byte_timeout(self, timeout: Duration) -> SendOptions
pub fn first_byte_timeout(self, timeout: Duration) -> SendOptions
WASI first-byte-timeout: how long the first byte of the response body may take.
Sourcepub fn between_bytes_timeout(self, timeout: Duration) -> SendOptions
pub fn between_bytes_timeout(self, timeout: Duration) -> SendOptions
WASI between-bytes-timeout: how long the gap between two pieces of the response body
may take.
Trait Implementations§
Source§impl Clone for SendOptions
impl Clone for SendOptions
Source§fn clone(&self) -> SendOptions
fn clone(&self) -> SendOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SendOptions
impl Debug for SendOptions
Source§impl Default for SendOptions
impl Default for SendOptions
Source§fn default() -> SendOptions
fn default() -> SendOptions
impl Eq for SendOptions
Source§impl PartialEq for SendOptions
impl PartialEq for SendOptions
impl StructuralPartialEq for SendOptions
Auto Trait Implementations§
impl Forget for SendOptions
impl Freeze for SendOptions
impl Move for SendOptions
impl RefUnwindSafe for SendOptions
impl Send for SendOptions
impl Sync for SendOptions
impl Unpin for SendOptions
impl UnsafeUnpin for SendOptions
impl UnwindSafe for SendOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.