pub struct FailoverStep { /* private fields */ }Expand description
One link of a Failover chain: a provider, the model it is asked for,
how long an attempt may take to start answering, and how many attempts
it gets before the chain moves on.
Implementations§
Source§impl FailoverStep
impl FailoverStep
pub fn new(provider: impl Provider + 'static) -> Self
pub fn from_arc(provider: Arc<dyn Provider>) -> Self
Sourcepub fn model(self, model: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
Ask this step for model instead of the request’s model.
Sourcepub fn deadline(self, deadline: Duration) -> Self
pub fn deadline(self, deadline: Duration) -> Self
How long one attempt may take to produce its first stream event (or,
through Provider::complete, its whole response). Default 90s.
Each attempt gets the full deadline, whatever earlier ones used.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FailoverStep
impl !UnwindSafe for FailoverStep
impl Forget for FailoverStep
impl Freeze for FailoverStep
impl Move for FailoverStep
impl Send for FailoverStep
impl Sync for FailoverStep
impl Unpin for FailoverStep
impl UnsafeUnpin for FailoverStepwhere
*const ArcInner<dyn Provider> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Provider>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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