GetCookies

Trait GetCookies 

Source
pub trait GetCookies: SealedCrypto + SealedCookies {
    // Provided methods
    fn cookies_filter<F>(
        &self,
        filter: F,
    ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
       where F: IntoCondition + Send,
             Self: Sync { ... }
    fn cookies_by_host<H>(
        &self,
        host: H,
    ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
       where Self: Sync,
             H: AsRef<str> + Send + Sync { ... }
    fn cookies_all(
        &self,
    ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
       where Self: Sync { ... }
    fn get_session_csrf<H>(
        &self,
        host: H,
    ) -> impl Future<Output = Result<LeetCodeCookies, ChromiumError>> + Send
       where Self: Sync,
             H: AsRef<str> + Send + Sync { ... }
}

Provided Methods§

Source

fn cookies_filter<F>( &self, filter: F, ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
where F: IntoCondition + Send, Self: Sync,

filter cookies

§Example:
use decrypt_cookies::{chromium::GetCookies, prelude::*};

#[tokio::main]
async fn main() {
    let edge_getter = ChromiumBuilder::<Chrome>::new()
        .build()
        .await
        .unwrap();
    let res = edge_getter
        .cookies_filter(ChromiumCookieCol::HostKey.contains("google.com"))
        .await
        .unwrap_or_default();
    dbg!(res);
}
Source

fn cookies_by_host<H>( &self, host: H, ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
where Self: Sync, H: AsRef<str> + Send + Sync,

Filter by host

Source

fn cookies_all( &self, ) -> impl Future<Output = Result<Vec<ChromiumCookie>, ChromiumError>> + Send
where Self: Sync,

Return all cookies

Source

fn get_session_csrf<H>( &self, host: H, ) -> impl Future<Output = Result<LeetCodeCookies, ChromiumError>> + Send
where Self: Sync, H: AsRef<str> + Send + Sync,

get LEETCODE_SESSION and csrftoken for leetcode

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§