#[non_exhaustive]pub struct RoutingCandidateOptions {
pub model: CandidateModel,
pub name: Option<String>,
pub description: Option<String>,
pub metadata: Option<JsonObject>,
}Expand description
How to build a RoutingCandidate (RoutingCandidateOptions): new and the
with_* setters, or the builder.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: CandidateModelThe model or nested router.
name: Option<String>A name strategies see.
description: Option<String>A description strategies see.
metadata: Option<JsonObject>Evidence strategies see; classifier strategies send it to their provider, so it must not contain secrets.
Implementations§
Source§impl RoutingCandidateOptions
impl RoutingCandidateOptions
Sourcepub fn builder() -> RoutingCandidateOptionsBuilder
pub fn builder() -> RoutingCandidateOptionsBuilder
Create an instance of RoutingCandidateOptions using the builder syntax
Source§impl RoutingCandidateOptions
impl RoutingCandidateOptions
Sourcepub fn new(model: impl Into<CandidateModel>) -> Self
pub fn new(model: impl Into<CandidateModel>) -> Self
Options with only the model.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn with_metadata(self, metadata: JsonObject) -> Self
pub fn with_metadata(self, metadata: JsonObject) -> Self
Sets the metadata.
Trait Implementations§
Source§impl Clone for RoutingCandidateOptions
impl Clone for RoutingCandidateOptions
Source§impl Debug for RoutingCandidateOptions
impl Debug for RoutingCandidateOptions
Source§impl From<RoutingCandidateOptions> for RoutingCandidate
impl From<RoutingCandidateOptions> for RoutingCandidate
Source§fn from(options: RoutingCandidateOptions) -> Self
fn from(options: RoutingCandidateOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RoutingCandidateOptions
impl !UnwindSafe for RoutingCandidateOptions
impl Freeze for RoutingCandidateOptions
impl Send for RoutingCandidateOptions
impl Sync for RoutingCandidateOptions
impl Unpin for RoutingCandidateOptions
impl UnsafeUnpin for RoutingCandidateOptions
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
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> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.