pub struct SmartKindBuilder<P>where
P: BrowserProvider,{ /* private fields */ }Expand description
Configures SmartKind.
Implementations§
Source§impl<P> SmartKindBuilder<P>where
P: BrowserProvider,
impl<P> SmartKindBuilder<P>where
P: BrowserProvider,
Sourcepub fn html_kind(self, builder: HtmlKindBuilder) -> SmartKindBuilder<P>
pub fn html_kind(self, builder: HtmlKindBuilder) -> SmartKindBuilder<P>
Replaces the complete HTML-kind configuration.
Sourcepub fn browser_kind(self, builder: BrowserKindBuilder<P>) -> SmartKindBuilder<P>
pub fn browser_kind(self, builder: BrowserKindBuilder<P>) -> SmartKindBuilder<P>
Replaces the complete browser-kind configuration.
Sourcepub fn detector<D>(self, detector: D) -> SmartKindBuilder<P>where
D: BrowserPromotionDetector,
pub fn detector<D>(self, detector: D) -> SmartKindBuilder<P>where
D: BrowserPromotionDetector,
Replaces the browser-promotion detector.
Sourcepub fn promote_status_codes(
self,
codes: impl IntoIterator<Item = u16>,
) -> SmartKindBuilder<P>
pub fn promote_status_codes( self, codes: impl IntoIterator<Item = u16>, ) -> SmartKindBuilder<P>
Replaces HTTP error statuses that trigger browser promotion.
Sourcepub fn sticky_promotion(self, enabled: bool) -> SmartKindBuilder<P>
pub fn sticky_promotion(self, enabled: bool) -> SmartKindBuilder<P>
Controls whether one promotion makes subsequent requests to that host browser-first.
Sourcepub fn session_pool(self, options: SessionPoolOptions) -> SmartKindBuilder<P>
pub fn session_pool(self, options: SessionPoolOptions) -> SmartKindBuilder<P>
Enables the one shared session pool with the supplied options.
Sourcepub fn disable_sessions(self) -> SmartKindBuilder<P>
pub fn disable_sessions(self) -> SmartKindBuilder<P>
Disables sessions on both execution paths.
Sourcepub fn build(self) -> Result<SmartKind<P>, HttpClientError>
pub fn build(self) -> Result<SmartKind<P>, HttpClientError>
Builds the smart kind and unifies session state across both execution paths.
Auto Trait Implementations§
impl<P> !Freeze for SmartKindBuilder<P>
impl<P> !RefUnwindSafe for SmartKindBuilder<P>
impl<P> !UnwindSafe for SmartKindBuilder<P>
impl<P> Send for SmartKindBuilder<P>
impl<P> Sync for SmartKindBuilder<P>
impl<P> Unpin for SmartKindBuilder<P>
impl<P> UnsafeUnpin for SmartKindBuilder<P>
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