Enum shiplift::transport::Transport[][src]

pub enum Transport {
    Tcp {
        client: Client<HttpConnector>,
        host: String,
    },
    EncryptedTcp {
        client: Client<HttpsConnector<HttpConnector>>,
        host: String,
    },
    Unix {
        client: Client<UnixConnector>,
        path: String,
    },
}

Transports are types which define the means of communication with the docker daemon

Variants

Tcp

A network tcp interface

Show fields

Fields of Tcp

client: Client<HttpConnector>host: String
EncryptedTcp

TCP/TLS

Show fields

Fields of EncryptedTcp

client: Client<HttpsConnector<HttpConnector>>host: String
Unix

A Unix domain socket

Show fields

Fields of Unix

client: Client<UnixConnector>path: String

Implementations

impl Transport[src]

pub async fn request<B, H>(
    &self,
    method: Method,
    endpoint: impl AsRef<str>,
    body: Option<(B, Mime)>,
    headers: Option<H>
) -> Result<String> where
    B: Into<Body>,
    H: IntoIterator<Item = (&'static str, String)>, 
[src]

Make a request and return the whole response in a String

pub fn stream_chunks<'stream, H, B>(
    &'stream self,
    method: Method,
    endpoint: impl AsRef<str> + 'stream,
    body: Option<(B, Mime)>,
    headers: Option<H>
) -> impl Stream<Item = Result<Bytes>> + 'stream where
    B: Into<Body> + 'stream,
    H: IntoIterator<Item = (&'static str, String)> + 'stream, 
[src]

pub async fn stream_upgrade<B>(
    &self,
    method: Method,
    endpoint: impl AsRef<str>,
    body: Option<(B, Mime)>
) -> Result<impl AsyncRead + AsyncWrite> where
    B: Into<Body>, 
[src]

Trait Implementations

impl Clone for Transport[src]

impl Debug for Transport[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.