Struct SelectedProfile
pub struct SelectedProfile { /* private fields */ }std and ua only.Expand description
A profile selected for one required capability set and flow.
Implementations§
§impl SelectedProfile
impl SelectedProfile
pub fn for_connection_bootstrap(
self,
seed: ProfileSeed,
connection_key: DrawKey,
) -> Result<SelectedProfile, SelectionError>
pub fn for_connection_bootstrap( self, seed: ProfileSeed, connection_key: DrawKey, ) -> Result<SelectedProfile, SelectionError>
Pin a caller-owned H3 operation to its connection’s initial recipe. References must resolve within this profile, flow and connection context.
§impl SelectedProfile
impl SelectedProfile
pub fn profile(&self) -> &UserAgentProfile
pub fn profile(&self) -> &UserAgentProfile
Borrow the selected profile.
pub fn profile_id(&self) -> ValueId
pub fn profile_id(&self) -> ValueId
Return the selected profile identity.
pub fn required(&self) -> CapabilitySet
pub fn required(&self) -> CapabilitySet
Capabilities the selected connection must provide.
pub fn pins(&self) -> VariantPins
pub fn pins(&self) -> VariantPins
Return the requested variant pins.
pub fn validate_negotiated_protocol(
&self,
version: Version,
) -> Result<(), SelectionError>
pub fn validate_negotiated_protocol( &self, version: Version, ) -> Result<(), SelectionError>
Check that the profile supports the negotiated protocol.
pub fn emulation_context(
self: Arc<SelectedProfile>,
seed: ProfileSeed,
connection_key: DrawKey,
request_key: DrawKey,
) -> EmulationContext
pub fn emulation_context( self: Arc<SelectedProfile>, seed: ProfileSeed, connection_key: DrawKey, request_key: DrawKey, ) -> EmulationContext
Bind this selected profile to the supplied deterministic draw keys.
pub fn connection(
&self,
context: &ConnectionContext,
seed: ProfileSeed,
key: DrawKey,
) -> Result<ConnectionSelection, SelectionError>
pub fn connection( &self, context: &ConnectionContext, seed: ProfileSeed, key: DrawKey, ) -> Result<ConnectionSelection, SelectionError>
Draw a connection offer without endpoint ECH readiness.
pub fn connection_with_ech(
&self,
context: &ConnectionContext,
seed: ProfileSeed,
key: DrawKey,
ech: bool,
) -> Result<ConnectionSelection, SelectionError>
pub fn connection_with_ech( &self, context: &ConnectionContext, seed: ProfileSeed, key: DrawKey, ech: bool, ) -> Result<ConnectionSelection, SelectionError>
Prefer matched ECH pairs only when the backend has a matching endpoint configuration and caller policy enables ECH. Otherwise draw the ordinary offer.
pub fn connection_with_offer_mode(
&self,
context: &ConnectionContext,
seed: ProfileSeed,
key: DrawKey,
ech: bool,
) -> Result<(ConnectionSelection, ConnectionOfferMode), SelectionError>
pub fn connection_with_offer_mode( &self, context: &ConnectionContext, seed: ProfileSeed, key: DrawKey, ech: bool, ) -> Result<(ConnectionSelection, ConnectionOfferMode), SelectionError>
Draw a connection and report whether its offer required derivation.
pub fn request(
&self,
connection: &ConnectionSelection,
flow: &FlowKey,
headers: &HeaderMap,
seed: ProfileSeed,
key: DrawKey,
) -> Result<RequestSelection, SelectionError>
pub fn request( &self, connection: &ConnectionSelection, flow: &FlowKey, headers: &HeaderMap, seed: ProfileSeed, key: DrawKey, ) -> Result<RequestSelection, SelectionError>
Draw a request variant for the selected connection and flow.
Trait Implementations§
§impl Clone for SelectedProfile
impl Clone for SelectedProfile
§fn clone(&self) -> SelectedProfile
fn clone(&self) -> SelectedProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Forget for SelectedProfile
impl Freeze for SelectedProfilewhere
*const ArcInner<UserAgentProfile> is !null: Freeze,
PhantomData<ArcInner<UserAgentProfile>>: Freeze,
*const ArcInner<RequestShapeCache> is !null: Freeze,
PhantomData<ArcInner<RequestShapeCache>>: Freeze,
*const ArcInner<DatabaseEvidence> is !null: Freeze,
PhantomData<ArcInner<DatabaseEvidence>>: Freeze,
*const [u8] is !null: Freeze,
PhantomData<[u8]>: Freeze,
*const str is !null: Freeze,
PhantomData<str>: Freeze,
impl Move for SelectedProfile
impl RefUnwindSafe for SelectedProfilewhere
Atomic<usize>: RefUnwindSafe,
Atomic<*mut ()>: RefUnwindSafe,
OnceLock<DecodedRequests>: RefUnwindSafe,
OnceLock<[CookieLayoutEvidence; 2]>: RefUnwindSafe,
OnceLock<FlowVersions>: RefUnwindSafe,
OnceLock<ConnectionModes>: RefUnwindSafe,
OnceLock<OrdinaryEvidence>: RefUnwindSafe,
OnceLock<HashMap<Box<str>, FamilyIndex, RandomState>>: RefUnwindSafe,
impl Send for SelectedProfile
impl Sync for SelectedProfile
impl Unpin for SelectedProfile
impl UnsafeUnpin for SelectedProfilewhere
*const ArcInner<UserAgentProfile> is !null: UnsafeUnpin,
PhantomData<ArcInner<UserAgentProfile>>: UnsafeUnpin,
*const ArcInner<RequestShapeCache> is !null: UnsafeUnpin,
PhantomData<ArcInner<RequestShapeCache>>: UnsafeUnpin,
*const ArcInner<DatabaseEvidence> is !null: UnsafeUnpin,
PhantomData<ArcInner<DatabaseEvidence>>: UnsafeUnpin,
*const [u8] is !null: UnsafeUnpin,
PhantomData<[u8]>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<str>: UnsafeUnpin,
impl UnwindSafe for SelectedProfilewhere
Arc<UserAgentProfile>: UnwindSafe,
Arc<RequestShapeCache>: UnwindSafe,
Arc<DatabaseEvidence>: UnwindSafe,
BoxRaw<[u8]>: UnwindSafe,
BoxRaw<str>: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more