pub enum Session {
Fetcher(Fetcher),
FetcherSession(FetcherSession),
}Expand description
A session backend that can be either a stateless fetcher or a stateful session.
The distinction matters for cookie handling: a Fetcher starts fresh on
every request, while a FetcherSession preserves cookies, headers, and
other state between requests. Choose the variant that matches your crawling
needs.
Variants§
Fetcher(Fetcher)
A stateless HTTP fetcher. Each request is independent – no cookies or headers carry over. This is the simplest option and works well for public pages that do not require authentication.
FetcherSession(FetcherSession)
A stateful HTTP session that persists cookies, headers, and other connection-level state across requests. Use this when you need to log in, maintain a CSRF token, or interact with session-dependent APIs.
Auto Trait Implementations§
impl !Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl !UnwindSafe for Session
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