Struct tonic_web_wasm_client::options::FetchOptions
source · pub struct FetchOptions {
pub cache: Option<Cache>,
pub credentials: Option<Credentials>,
pub integrity: Option<String>,
pub mode: Option<Mode>,
pub redirect: Option<Redirect>,
pub referrer: Option<String>,
pub referrer_policy: Option<ReferrerPolicy>,
}
Expand description
Options for underlying fetch
call
Fields§
§cache: Option<Cache>
Request’s cache mode
credentials: Option<Credentials>
Request’s credentials mode
integrity: Option<String>
Requests’s integrity
mode: Option<Mode>
Request’s mode
redirect: Option<Redirect>
Request’s redirect mode
referrer: Option<String>
Request’s referrer
referrer_policy: Option<ReferrerPolicy>
Request’s referrer policy
Implementations§
source§impl FetchOptions
impl FetchOptions
sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Set request’s credentials mode
sourcepub fn referrer_policy(self, referrer_policy: ReferrerPolicy) -> Self
pub fn referrer_policy(self, referrer_policy: ReferrerPolicy) -> Self
Set request’s referrer policy
Trait Implementations§
source§impl Clone for FetchOptions
impl Clone for FetchOptions
source§fn clone(&self) -> FetchOptions
fn clone(&self) -> FetchOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FetchOptions
impl Debug for FetchOptions
source§impl Default for FetchOptions
impl Default for FetchOptions
source§fn default() -> FetchOptions
fn default() -> FetchOptions
Returns the “default value” for a type. Read more
source§impl From<FetchOptions> for RequestInit
impl From<FetchOptions> for RequestInit
source§fn from(value: FetchOptions) -> Self
fn from(value: FetchOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FetchOptions
impl RefUnwindSafe for FetchOptions
impl Send for FetchOptions
impl Sync for FetchOptions
impl Unpin for FetchOptions
impl UnwindSafe for FetchOptions
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request