pub struct ProviderHandle { /* private fields */ }Expand description
Owning handle to provider components. This is an executable transport handle supplied by the host, not a persistence format.
Implementations§
Source§impl ProviderHandle
impl ProviderHandle
pub fn new(components: ProviderComponents) -> ProviderHandle
pub fn components(&self) -> &ProviderComponents
pub fn components_mut(&mut self) -> &mut ProviderComponents
pub fn with_clock(self, clock: Arc<dyn Clock>) -> ProviderHandle
pub fn kind(&self) -> &'static str
pub fn supported_variants(&self, model: &str) -> &'static [&'static str]
pub fn validate_variant(&self, model: &str, variant: &str) -> Result<(), String>
pub fn input_usage_excludes_cached_tokens(&self) -> bool
pub fn options(&self) -> ProviderOptions
pub fn set_options(&mut self, options: ProviderOptions)
pub fn requires_streaming(&self) -> bool
pub async fn complete( &mut self, request: LlmRequest, ) -> Result<LlmResponse, ProviderFailure>
pub fn to_spec(&self) -> ProviderSpec
Trait Implementations§
Source§impl Clone for ProviderHandle
impl Clone for ProviderHandle
Source§fn clone(&self) -> ProviderHandle
fn clone(&self) -> ProviderHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProviderHandle
impl Debug for ProviderHandle
Source§impl Default for ProviderHandle
impl Default for ProviderHandle
Source§fn default() -> ProviderHandle
fn default() -> ProviderHandle
Returns the “default value” for a type. Read more
impl Eq for ProviderHandle
Source§impl PartialEq for ProviderHandle
impl PartialEq for ProviderHandle
Source§fn eq(&self, other: &ProviderHandle) -> bool
fn eq(&self, other: &ProviderHandle) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
impl !RefUnwindSafe for ProviderHandle
impl !UnwindSafe for ProviderHandle
impl Freeze for ProviderHandle
impl Send for ProviderHandle
impl Sync for ProviderHandle
impl Unpin for ProviderHandle
impl UnsafeUnpin for ProviderHandle
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