Skip to main content

ProfileSource

Trait ProfileSource 

pub trait ProfileSource:
    Send
    + Sync
    + 'static {
    // Required method
    fn select_profile(
        &self,
        request: &SelectionRequest,
        seed: ProfileSeed,
        key: DrawKey,
    ) -> Result<SelectedProfile, SelectionError>;
}
Available on crate features std and ua only.
Expand description

Source of captured profiles for ProfileEmulateLayer.

UserAgentDatabase is the reference implementation; a single profile is a one-entry database. Custom sources can route requests to different databases.

Required Methods§

fn select_profile( &self, request: &SelectionRequest, seed: ProfileSeed, key: DrawKey, ) -> Result<SelectedProfile, SelectionError>

Draw a profile for one request flow.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl ProfileSource for UserAgentDatabase

§

impl<A, B, C, D, E, F, G, H, I> ProfileSource for Either9<A, B, C, D, E, F, G, H, I>

§

impl<A, B, C, D, E, F, G, H> ProfileSource for Either8<A, B, C, D, E, F, G, H>

§

impl<A, B, C, D, E, F, G> ProfileSource for Either7<A, B, C, D, E, F, G>

§

impl<A, B, C, D, E, F> ProfileSource for Either6<A, B, C, D, E, F>

§

impl<A, B, C, D, E> ProfileSource for Either5<A, B, C, D, E>

§

impl<A, B, C, D> ProfileSource for Either4<A, B, C, D>

§

impl<A, B, C> ProfileSource for Either3<A, B, C>

§

impl<A, B> ProfileSource for Either<A, B>

§

impl<P> ProfileSource for Arc<P>
where P: ProfileSource,

§

impl<P> ProfileSource for Box<P>
where P: ProfileSource,