Enum docker_api::conn::Transport
source · [−]pub enum Transport {
Tcp {
client: Client<HttpConnector<GaiResolver>, Body>,
host: Url,
},
EncryptedTcp {
client: Client<HttpsConnector<HttpConnector<GaiResolver>>, Body>,
host: Url,
},
Unix {
client: Client<UnixConnector, Body>,
path: PathBuf,
},
}
Expand description
Transports are types which define supported means of communication.
Variants
Tcp
A network tcp interface
EncryptedTcp
TCP/TLS
Unix
A Unix domain socket
Implementations
sourceimpl Transport
impl Transport
pub fn remote_addr(&self) -> &str
pub async fn request<B>(
&self,
method: Method,
endpoint: impl AsRef<str>,
body: Payload<B>,
headers: Option<Headers>
) -> Result<Response<Body>, Error> where
B: Into<Body>,
pub async fn request_string<B>(
&self,
method: Method,
endpoint: impl AsRef<str>,
body: Payload<B>,
headers: Option<Headers>
) -> Result<String, Error> where
B: Into<Body>,
pub fn stream_chunks<'transport, B>(
&'transport self,
method: Method,
endpoint: impl AsRef<str> + 'transport,
body: Payload<B>,
headers: Option<Headers>
) -> impl Stream<Item = Result<Bytes, Error>> + 'transport where
B: 'transport + Into<Body>,
pub fn stream_json_chunks<'transport, B>(
&'transport self,
method: Method,
endpoint: impl AsRef<str> + 'transport,
body: Payload<B>,
headers: Option<Headers>
) -> impl Stream<Item = Result<Bytes, Error>> + 'transport where
B: 'transport + Into<Body>,
pub async fn stream_upgrade<B>(
&self,
method: Method,
endpoint: impl AsRef<str>,
body: Payload<B>
) -> Result<impl AsyncRead + AsyncWrite, Error> where
B: Into<Body>,
pub async fn get_body<B>(
&self,
method: Method,
endpoint: impl AsRef<str>,
body: Payload<B>,
headers: Option<Headers>
) -> Result<Body, Error> where
B: Into<Body>,
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl !UnwindSafe for Transport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more