Struct ConnectIpRequestBuilder
pub struct ConnectIpRequestBuilder { /* private fields */ }masque only.Expand description
Prepare a CONNECT-IP handshake from a configured endpoint and typed scope.
Headers and extensions remain available for authentication and HTTP layers. The method, URI, version and protocol are prepared together by the template. No tunnel bytes are sent before the response is validated.
Implementations§
§impl ConnectIpRequestBuilder
impl ConnectIpRequestBuilder
pub fn new(
template: &ConnectIpTemplate,
scope: &ConnectIpScope,
version: Version,
config: ConnectIpSessionConfig,
) -> Result<ConnectIpRequestBuilder, ConnectIpRequestError>
pub fn new( template: &ConnectIpTemplate, scope: &ConnectIpScope, version: Version, config: ConnectIpSessionConfig, ) -> Result<ConnectIpRequestBuilder, ConnectIpRequestError>
Prepare an empty HTTP request for this endpoint, scope and HTTP version.
pub fn try_from_request(
template: &ConnectIpTemplate,
request: Request,
config: ConnectIpSessionConfig,
) -> Result<ConnectIpRequestBuilder, ConnectIpRequestError>
pub fn try_from_request( template: &ConnectIpTemplate, request: Request, config: ConnectIpSessionConfig, ) -> Result<ConnectIpRequestBuilder, ConnectIpRequestError>
Recover a request passed through a low-level HTTP connection establishment.
This escape hatch validates the complete handshake against the configured
endpoint, including its scope, before it can be sent. Prefer Self::new
when using an HTTP client service directly.
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Add authentication or application headers.
pub fn extensions(&self) -> &Extensions
pub fn extensions(&self) -> &Extensions
Metadata consumed by HTTP client layers.
pub fn with_open_timeout(self, timeout: Duration) -> ConnectIpRequestBuilder
pub fn with_open_timeout(self, timeout: Duration) -> ConnectIpRequestBuilder
Total handshake deadline, independent of packet write timeouts. A zero timeout refuses an opening that cannot complete immediately.
pub fn set_open_timeout(
&mut self,
timeout: Duration,
) -> &mut ConnectIpRequestBuilder
pub fn set_open_timeout( &mut self, timeout: Duration, ) -> &mut ConnectIpRequestBuilder
Total handshake deadline, independent of packet write timeouts. A zero timeout refuses an opening that cannot complete immediately.
pub async fn connect<S, B>(
self,
client: &S,
) -> Result<ConnectIpSession, Box<dyn Error + Send + Sync>>
pub async fn connect<S, B>( self, client: &S, ) -> Result<ConnectIpSession, Box<dyn Error + Send + Sync>>
Open the session with an existing Rama HTTP client.
The client must honor the HTTPS URI and requested HTTP version. Response bodies remain generic: packet I/O comes from the HTTP upgrade extension.
Trait Implementations§
§impl Debug for ConnectIpRequestBuilder
impl Debug for ConnectIpRequestBuilder
§impl<S, B> Service<ConnectIpRequestBuilder> for ConnectIpConnector<S>
impl<S, B> Service<ConnectIpRequestBuilder> for ConnectIpConnector<S>
§type Output = ConnectIpSession
type Output = ConnectIpSession
§async fn serve(
&self,
request: ConnectIpRequestBuilder,
) -> Result<<ConnectIpConnector<S> as Service<ConnectIpRequestBuilder>>::Output, <ConnectIpConnector<S> as Service<ConnectIpRequestBuilder>>::Error>
async fn serve( &self, request: ConnectIpRequestBuilder, ) -> Result<<ConnectIpConnector<S> as Service<ConnectIpRequestBuilder>>::Output, <ConnectIpConnector<S> as Service<ConnectIpRequestBuilder>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl !Freeze for ConnectIpRequestBuilder
impl !RefUnwindSafe for ConnectIpRequestBuilder
impl !UnwindSafe for ConnectIpRequestBuilder
impl Send for ConnectIpRequestBuilder
impl Sync for ConnectIpRequestBuilder
impl Unpin for ConnectIpRequestBuilder
impl UnsafeUnpin for ConnectIpRequestBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more