#[non_exhaustive]pub struct NetOptions {
pub reference_only_openings: ReferenceOnlyOpenings,
}Expand description
Options for a net request; Default is lower_product_net’s
behaviour.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.reference_only_openings: ReferenceOnlyOpeningsWhat to do with a Reference-only opening.
Implementations§
Source§impl NetOptions
impl NetOptions
Sourcepub fn with_reference_only_openings(self, policy: ReferenceOnlyOpenings) -> Self
pub fn with_reference_only_openings(self, policy: ReferenceOnlyOpenings) -> Self
Set what to do with a Reference-only opening.
Builder-style, because the struct is #[non_exhaustive]:
NetOptions::default().with_reference_only_openings(policy).
Trait Implementations§
Source§impl Clone for NetOptions
impl Clone for NetOptions
Source§fn clone(&self) -> NetOptions
fn clone(&self) -> NetOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NetOptions
Source§impl Debug for NetOptions
impl Debug for NetOptions
Source§impl Default for NetOptions
impl Default for NetOptions
Source§fn default() -> NetOptions
fn default() -> NetOptions
Returns the “default value” for a type. Read more
impl Eq for NetOptions
Source§impl PartialEq for NetOptions
impl PartialEq for NetOptions
impl StructuralPartialEq for NetOptions
Auto Trait Implementations§
impl Freeze for NetOptions
impl RefUnwindSafe for NetOptions
impl Send for NetOptions
impl Sync for NetOptions
impl Unpin for NetOptions
impl UnsafeUnpin for NetOptions
impl UnwindSafe for NetOptions
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