pub struct AlpineClient { /* private fields */ }Implementations§
Source§impl AlpineClient
impl AlpineClient
pub fn new(provider: impl Provider + 'static) -> Self
pub fn with_middleware(self, m: impl Middleware + 'static) -> Self
Sourcepub async fn complete(&self, req: Request) -> Result<Response, ProviderError>
pub async fn complete(&self, req: Request) -> Result<Response, ProviderError>
Run the request through the middleware chain, then the provider.
Sourcepub async fn stream(
&self,
req: &Request,
) -> Result<StreamResponse<'_>, ProviderError>
pub async fn stream( &self, req: &Request, ) -> Result<StreamResponse<'_>, ProviderError>
Stream bypasses middleware for now — middleware is request/response oriented. Streaming middleware is a separate concern.
Auto Trait Implementations§
impl Freeze for AlpineClient
impl !RefUnwindSafe for AlpineClient
impl Send for AlpineClient
impl Sync for AlpineClient
impl Unpin for AlpineClient
impl UnsafeUnpin for AlpineClient
impl !UnwindSafe for AlpineClient
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