Struct NullTransport
#[non_exhaustive]pub struct NullTransport;Expand description
The transport that owns no I/O.
Every round trip fails. It exists so the adapter’s types can be instantiated, its trait impls checked at a concrete type, and its doctests compiled, without this crate depending on an HTTP client or a TLS stack.
Implementations§
§impl NullTransport
impl NullTransport
pub const fn new() -> Self
pub const fn new() -> Self
Creates the null transport.
Trait Implementations§
§impl Clone for NullTransport
impl Clone for NullTransport
impl Copy for NullTransport
§impl Debug for NullTransport
impl Debug for NullTransport
§impl Default for NullTransport
impl Default for NullTransport
§impl SqlTransport for NullTransport
impl SqlTransport for NullTransport
§fn reads_settled(&self) -> impl Future<Output = ()>
fn reads_settled(&self) -> impl Future<Output = ()>
Ready at once: this transport never dispatches a request.
§type Error = NullTransportError
type Error = NullTransportError
How the transport fails before an HTTP answer exists: DNS, TLS, a
rejected
fetch, a timeout. Read more§fn round_trip(
&self,
_request: SqlRequest,
) -> impl Future<Output = Result<HttpResponse, Self::Error>>
fn round_trip( &self, _request: SqlRequest, ) -> impl Future<Output = Result<HttpResponse, Self::Error>>
Sends
request and returns the whole answer. Read moreAuto Trait Implementations§
impl Freeze for NullTransport
impl RefUnwindSafe for NullTransport
impl Send for NullTransport
impl Sync for NullTransport
impl Unpin for NullTransport
impl UnsafeUnpin for NullTransport
impl UnwindSafe for NullTransport
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