pub struct FakeSidecar { /* private fields */ }Expand description
A dispatcher backed by an in-process router.
Implementations§
Trait Implementations§
Source§impl Dispatcher for FakeSidecar
impl Dispatcher for FakeSidecar
Source§fn has(&self, binding: &str) -> bool
fn has(&self, binding: &str) -> bool
Whether a binding of this name exists. Cheap; called per request before
dispatching so a missing binding degrades one prefix rather than
surfacing as a transport error.
Source§fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
binding: &'life1 str,
request: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, DispatchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
binding: &'life1 str,
request: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, DispatchError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Forward
request to the bound Worker and return its response
unaltered. Implementations must not retry: a sidecar call is inside
the caller’s request, and a retry would double any side effect.Auto Trait Implementations§
impl !Freeze for FakeSidecar
impl !RefUnwindSafe for FakeSidecar
impl !UnwindSafe for FakeSidecar
impl Send for FakeSidecar
impl Sync for FakeSidecar
impl Unpin for FakeSidecar
impl UnsafeUnpin for FakeSidecar
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