pub enum Backend {
GoogleAi(GoogleAiBackend),
VertexAi(VertexAiBackend),
}Expand description
High-level backend configuration enum used by the Rust port.
This combines the behaviour of the TypeScript Backend base class and its concrete
subclasses so we can work with a single, cloneable configuration value.
Variants§
GoogleAi(GoogleAiBackend)
VertexAi(VertexAiBackend)
Implementations§
Source§impl Backend
impl Backend
Sourcepub fn vertex_ai<S: Into<String>>(location: S) -> Self
pub fn vertex_ai<S: Into<String>>(location: S) -> Self
Creates a Vertex AI backend configuration with the provided region.
Sourcepub fn backend_type(&self) -> BackendType
pub fn backend_type(&self) -> BackendType
Returns the backend type tag.
Sourcepub fn as_vertex_ai(&self) -> Option<&VertexAiBackend>
pub fn as_vertex_ai(&self) -> Option<&VertexAiBackend>
Returns the backend as a Vertex AI configuration if applicable.
Trait Implementations§
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnwindSafe for Backend
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.