pub struct Wire<T>(pub T);Expand description
Adapts any TapesTransport onto the SpecTransport the cassette cache
fetches through.
This is where the two seams meet, and it is four request descriptions long
— which is the point. The cache’s freshness rules, its revalidation ladder,
and its degradation behaviour are written once against SpecTransport;
what changes between a consumer’s own client and a transport this crate
drives is only how the bytes are fetched.
Tuple Fields§
§0: TImplementations§
Trait Implementations§
impl<T: Copy> Copy for Wire<T>
Source§impl<T: TapesTransport> SpecTransport for Wire<T>
impl<T: TapesTransport> SpecTransport for Wire<T>
Source§impl<T: TapesTransport> TapesTransport for Wire<T>
impl<T: TapesTransport> TapesTransport for Wire<T>
Source§fn send(
&self,
request: &WireRequest<'_>,
) -> impl Future<Output = Result<WireResponse, TransportError>>
fn send( &self, request: &WireRequest<'_>, ) -> impl Future<Output = Result<WireResponse, TransportError>>
Send one described request.
Auto Trait Implementations§
impl<T> Freeze for Wire<T>where
T: Freeze,
impl<T> RefUnwindSafe for Wire<T>where
T: RefUnwindSafe,
impl<T> Send for Wire<T>where
T: Send,
impl<T> Sync for Wire<T>where
T: Sync,
impl<T> Unpin for Wire<T>where
T: Unpin,
impl<T> UnsafeUnpin for Wire<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Wire<T>where
T: UnwindSafe,
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