pub struct NoopSamplingProvider;Expand description
A sampling provider that is always unavailable.
Used as a default when no provider is configured. All calls return
SamplingError::NotAvailable, enabling graceful degradation in callers.
§Examples
use synwire_core::agents::sampling::{NoopSamplingProvider, SamplingProvider, SamplingRequest};
let p = NoopSamplingProvider;
assert!(!p.is_available());Trait Implementations§
Source§impl SamplingProvider for NoopSamplingProvider
impl SamplingProvider for NoopSamplingProvider
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Returns
true if sampling is available (provider configured).Source§fn sample(
&self,
_request: SamplingRequest,
) -> BoxFuture<'_, Result<SamplingResponse, SamplingError>>
fn sample( &self, _request: SamplingRequest, ) -> BoxFuture<'_, Result<SamplingResponse, SamplingError>>
Request a completion from the LLM. Read more
Auto Trait Implementations§
impl Freeze for NoopSamplingProvider
impl RefUnwindSafe for NoopSamplingProvider
impl Send for NoopSamplingProvider
impl Sync for NoopSamplingProvider
impl Unpin for NoopSamplingProvider
impl UnsafeUnpin for NoopSamplingProvider
impl UnwindSafe for NoopSamplingProvider
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