#[non_exhaustive]pub struct RoutingConfig {
pub routing_config: Option<RoutingConfig>,
/* private fields */
}Available on crate features
gen-ai-tuning-service or llm-utility-service or prediction-service only.Expand description
The configuration for routing the request to a specific model.
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.routing_config: Option<RoutingConfig>Routing mode.
Implementations§
Source§impl RoutingConfig
impl RoutingConfig
pub fn new() -> Self
Sourcepub fn set_routing_config<T: Into<Option<RoutingConfig>>>(self, v: T) -> Self
pub fn set_routing_config<T: Into<Option<RoutingConfig>>>(self, v: T) -> Self
Sets the value of routing_config.
Note that all the setters affecting routing_config are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::generation_config::routing_config::AutoRoutingMode;
let x = RoutingConfig::new().set_routing_config(Some(
google_cloud_aiplatform_v1::model::generation_config::routing_config::RoutingConfig::AutoMode(AutoRoutingMode::default().into())));Sourcepub fn auto_mode(&self) -> Option<&Box<AutoRoutingMode>>
pub fn auto_mode(&self) -> Option<&Box<AutoRoutingMode>>
The value of routing_config
if it holds a AutoMode, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_mode<T: Into<Box<AutoRoutingMode>>>(self, v: T) -> Self
pub fn set_auto_mode<T: Into<Box<AutoRoutingMode>>>(self, v: T) -> Self
Sets the value of routing_config
to hold a AutoMode.
Note that all the setters affecting routing_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::generation_config::routing_config::AutoRoutingMode;
let x = RoutingConfig::new().set_auto_mode(AutoRoutingMode::default()/* use setters */);
assert!(x.auto_mode().is_some());
assert!(x.manual_mode().is_none());Sourcepub fn manual_mode(&self) -> Option<&Box<ManualRoutingMode>>
pub fn manual_mode(&self) -> Option<&Box<ManualRoutingMode>>
The value of routing_config
if it holds a ManualMode, None if the field is not set or
holds a different branch.
Sourcepub fn set_manual_mode<T: Into<Box<ManualRoutingMode>>>(self, v: T) -> Self
pub fn set_manual_mode<T: Into<Box<ManualRoutingMode>>>(self, v: T) -> Self
Sets the value of routing_config
to hold a ManualMode.
Note that all the setters affecting routing_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::generation_config::routing_config::ManualRoutingMode;
let x = RoutingConfig::new().set_manual_mode(ManualRoutingMode::default()/* use setters */);
assert!(x.manual_mode().is_some());
assert!(x.auto_mode().is_none());Trait Implementations§
Source§impl Clone for RoutingConfig
impl Clone for RoutingConfig
Source§fn clone(&self) -> RoutingConfig
fn clone(&self) -> RoutingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoutingConfig
impl Debug for RoutingConfig
Source§impl Default for RoutingConfig
impl Default for RoutingConfig
Source§fn default() -> RoutingConfig
fn default() -> RoutingConfig
Returns the “default value” for a type. Read more
Source§impl Message for RoutingConfig
impl Message for RoutingConfig
Source§impl PartialEq for RoutingConfig
impl PartialEq for RoutingConfig
impl StructuralPartialEq for RoutingConfig
Auto Trait Implementations§
impl Freeze for RoutingConfig
impl RefUnwindSafe for RoutingConfig
impl Send for RoutingConfig
impl Sync for RoutingConfig
impl Unpin for RoutingConfig
impl UnsafeUnpin for RoutingConfig
impl UnwindSafe for RoutingConfig
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