pub struct SelectionContextBuilder<___State = __SelectionContextBuilderInitialState> { /* private fields */ }Expand description
Use builder syntax to set the required parameters and finish by calling the method Self::build().
Implementations§
Source§impl<__EstimatedCost, __HashKey, __Tags, __Exclude> SelectionContextBuilder<(__EstimatedCost, __HashKey, __Tags, __Exclude)>
impl<__EstimatedCost, __HashKey, __Tags, __Exclude> SelectionContextBuilder<(__EstimatedCost, __HashKey, __Tags, __Exclude)>
Sourcepub fn build(self) -> SelectionContextwhere
__EstimatedCost: IntoSet<Option<f64>, SelectionContextBuilder__estimated_cost>,
__HashKey: IntoSet<Option<u64>, SelectionContextBuilder__hash_key>,
__Tags: IntoSet<Option<HashMap<String, String>>, SelectionContextBuilder__tags>,
__Exclude: IntoSet<Option<Vec<usize>>, SelectionContextBuilder__exclude>,
pub fn build(self) -> SelectionContextwhere
__EstimatedCost: IntoSet<Option<f64>, SelectionContextBuilder__estimated_cost>,
__HashKey: IntoSet<Option<u64>, SelectionContextBuilder__hash_key>,
__Tags: IntoSet<Option<HashMap<String, String>>, SelectionContextBuilder__tags>,
__Exclude: IntoSet<Option<Vec<usize>>, SelectionContextBuilder__exclude>,
Finishes building and returns the requested object.
Sourcepub fn maybe_estimated_cost(
self,
value: Option<f64>,
) -> <Self as __SelectionContextBuilderSetMember>::EstimatedCostwhere
__EstimatedCost: IsUnset,
pub fn maybe_estimated_cost(
self,
value: Option<f64>,
) -> <Self as __SelectionContextBuilderSetMember>::EstimatedCostwhere
__EstimatedCost: IsUnset,
Same as Self::estimated_cost, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn estimated_cost(
self,
value: f64,
) -> <Self as __SelectionContextBuilderSetMember>::EstimatedCostwhere
__EstimatedCost: IsUnset,
pub fn estimated_cost(
self,
value: f64,
) -> <Self as __SelectionContextBuilderSetMember>::EstimatedCostwhere
__EstimatedCost: IsUnset,
Estimated cost/weight of this request (e.g., token count).
Sourcepub fn maybe_hash_key(
self,
value: Option<u64>,
) -> <Self as __SelectionContextBuilderSetMember>::HashKeywhere
__HashKey: IsUnset,
pub fn maybe_hash_key(
self,
value: Option<u64>,
) -> <Self as __SelectionContextBuilderSetMember>::HashKeywhere
__HashKey: IsUnset,
Same as Self::hash_key, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn hash_key(
self,
value: u64,
) -> <Self as __SelectionContextBuilderSetMember>::HashKeywhere
__HashKey: IsUnset,
pub fn hash_key(
self,
value: u64,
) -> <Self as __SelectionContextBuilderSetMember>::HashKeywhere
__HashKey: IsUnset,
Hash key for consistent hashing strategies.
Same as Self::tags, but accepts an Option as input. See that method’s documentation for more details.
Arbitrary tags for routing decisions. None by default to avoid allocation.
Sourcepub fn maybe_exclude(
self,
value: Option<Vec<usize>>,
) -> <Self as __SelectionContextBuilderSetMember>::Excludewhere
__Exclude: IsUnset,
pub fn maybe_exclude(
self,
value: Option<Vec<usize>>,
) -> <Self as __SelectionContextBuilderSetMember>::Excludewhere
__Exclude: IsUnset,
Same as Self::exclude, but accepts an Option as input. See that method’s documentation for more details.
Auto Trait Implementations§
impl<___State> Freeze for SelectionContextBuilder<___State>where
___State: Freeze,
impl<___State> RefUnwindSafe for SelectionContextBuilder<___State>where
___State: RefUnwindSafe,
impl<___State> Send for SelectionContextBuilder<___State>where
___State: Send,
impl<___State> Sync for SelectionContextBuilder<___State>where
___State: Sync,
impl<___State> Unpin for SelectionContextBuilder<___State>where
___State: Unpin,
impl<___State> UnsafeUnpin for SelectionContextBuilder<___State>where
___State: UnsafeUnpin,
impl<___State> UnwindSafe for SelectionContextBuilder<___State>where
___State: UnwindSafe,
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