GetCookies

Trait GetCookies 

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

Provided Methods§

Source

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

filter by condition

§Example
use decrypt_cookies::{firefox::MozCookiesCol, Browser, FirefoxBuilder, ColumnTrait};

#[tokio::main]
async fn main() {
    let ffget = FirefoxBuilder::new(Firefox::new().unwrap())
        .build()
        .await
        .unwrap();
    let res = ffget
        .cookies_filter(MozCookiesCol::Host.contains("mozilla.com"))
        .await
        .unwrap_or_default();
}
Source

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

Source

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

Filter cookies by host

Source

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

get session csrf 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§