[−][src]Struct solicit::http::client::CleartextConnector
A struct that establishes a cleartext TCP connection that can be used by an HTTP/2 connection. Defaults to using port 80.
It assumes that the connection is based on prior knowledge of the server's support for HTTP/2.
More information in the spec
Fields
host: &'a str
The host to which the connection should be established
port: u16
The port on which the connection should be established
Implementations
impl<'a> CleartextConnector<'a>
[src]
pub fn new(host: &'a str) -> CleartextConnector
[src]
Creates a new CleartextConnector
that will attempt to establish a connection to the given
host on port 80.
pub fn with_port(host: &'a str, port: u16) -> CleartextConnector
[src]
Creates a new CleartextConnector
that will attempt to establish a connection to the given
host on the given port.
Trait Implementations
impl<'a> HttpConnect for CleartextConnector<'a>
[src]
type Stream = TcpStream
The type of the underlying transport stream that the HttpConnection
s produced by this HttpConnect
implementation will be based on. Read more
type Err = CleartextConnectError
The type of the error that can be produced by trying to establish the connection (i.e. calling the connect
method). Read more
fn connect(self) -> Result<ClientStream<TcpStream>, CleartextConnectError>
[src]
Establishes a cleartext TCP connection based on the host and port.
If it is not possible, returns an HttpError
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for CleartextConnector<'a>
impl<'a> Send for CleartextConnector<'a>
impl<'a> Sync for CleartextConnector<'a>
impl<'a> Unpin for CleartextConnector<'a>
impl<'a> UnwindSafe for CleartextConnector<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,