Struct ClientEndpoint
pub struct ClientEndpoint { /* private fields */ }quic and std only.Expand description
A QUIC endpoint to open one client connection from, as an endpoint connector hands it out
to a QuicConnector.
ready turns it into the endpoint for the final transport profile of a
request: an endpoint on a datagram socket is built then, and a managed endpoint is
replaced when that profile needs other endpoint-wide settings. Before that it holds the
facts of the path below the endpoint: its peer, its
local_addr and its extensions, such as the
EstablishedProxyRoute of a proxy tunnel.
Implementations§
§impl ClientEndpoint
impl ClientEndpoint
pub fn new(endpoint: Endpoint) -> ClientEndpoint
pub fn new(endpoint: Endpoint) -> ClientEndpoint
An endpoint that can reach any remote, used whatever the transport profile.
pub fn with_peer(self, peer: SocketAddr) -> ClientEndpoint
pub fn with_peer(self, peer: SocketAddr) -> ClientEndpoint
An endpoint whose socket reaches peer only, such as a connected socket or a
network tunnel. An established addressless association retains its transport route.
pub fn peer(&self) -> Option<SocketAddr>
pub fn peer(&self) -> Option<SocketAddr>
The only remote this endpoint reaches, when its socket is fixed to one.
pub fn local_addr(&self) -> Result<SocketAddr, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
The local address of the endpoint’s socket.
pub async fn ready(
self,
input: &ConnectRequest,
) -> Result<ReadyClientEndpoint, ConnectionError>
pub async fn ready( self, input: &ConnectRequest, ) -> Result<ReadyClientEndpoint, ConnectionError>
The endpoint the connection of input is opened from, fitting its final transport
profile.
Trait Implementations§
§impl Debug for ClientEndpoint
impl Debug for ClientEndpoint
§impl ExtensionsRef for ClientEndpoint
impl ExtensionsRef for ClientEndpoint
§fn extensions(&self) -> &Extensions
fn extensions(&self) -> &Extensions
Extensions storeAuto Trait Implementations§
impl !Freeze for ClientEndpoint
impl !RefUnwindSafe for ClientEndpoint
impl !UnwindSafe for ClientEndpoint
impl Forget for ClientEndpoint
impl Move for ClientEndpoint
impl Send for ClientEndpointwhere
Arc<EndpointInner>: Send,
Arc<TransportConfig>: Send,
Arc<dyn ClientConfig>: Send,
Arc<dyn TokenStore>: Send,
Arc<dyn Fn() -> ConnectionId + Send + Sync>: Send,
RawVecInner: Send,
Arc<dyn TimeSource>: Send,
Arc<Mutex<ManagedEndpoints>>: Send,
Arc<Node>: Send,
Arc<Composite>: Send,
Atomic<u8>: Send,
BoxRaw<dyn ReceiveSocket>: Send,
BoxRaw<dyn ConnectedDatagrams<Sender = Box<dyn ConnectedDatagramSender>>>: Send,
BoxRaw<dyn DatagramSender>: Send,
BoxRaw<dyn ConnectedDatagramSender>: Send,
NonZero<usize>: Send,
BoxRaw<[u8]>: Send,
Arc<Node>: Send,
Arc<Semaphore>: Send,
impl Sync for ClientEndpointwhere
Arc<EndpointInner>: Sync,
Arc<TransportConfig>: Sync,
Arc<dyn ClientConfig>: Sync,
Arc<dyn TokenStore>: Sync,
Arc<dyn Fn() -> ConnectionId + Send + Sync>: Sync,
RawVecInner: Sync,
Arc<dyn TimeSource>: Sync,
Arc<Mutex<ManagedEndpoints>>: Sync,
Arc<Node>: Sync,
Arc<Composite>: Sync,
Mutex<RawMutex, Socket>: Sync,
Arc<Node>: Sync,
Arc<Semaphore>: Sync,
impl Unpin for ClientEndpointwhere
Arc<EndpointInner>: Unpin,
Arc<TransportConfig>: Unpin,
Arc<dyn ClientConfig>: Unpin,
Arc<dyn TokenStore>: Unpin,
Arc<dyn Fn() -> ConnectionId + Send + Sync>: Unpin,
*const u8 is !null: Unpin,
Arc<dyn TimeSource>: Unpin,
Arc<Mutex<ManagedEndpoints>>: Unpin,
Arc<Node>: Unpin,
Arc<Composite>: Unpin,
Align1<u8>: Unpin,
Box<dyn ReceiveSocket>: Unpin,
Box<dyn ConnectedDatagrams<Sender = Box<dyn ConnectedDatagramSender>>>: Unpin,
Box<dyn DatagramSender>: Unpin,
Box<dyn ConnectedDatagramSender>: Unpin,
NonZero<usize>: Unpin,
Box<[u8]>: Unpin,
Arc<Node>: Unpin,
Arc<Semaphore>: Unpin,
impl UnsafeUnpin for ClientEndpointwhere
*const ArcInner<EndpointInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<EndpointInner>>: UnsafeUnpin,
*const ArcInner<TransportConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<TransportConfig>>: UnsafeUnpin,
*const ArcInner<dyn ClientConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ClientConfig>>: UnsafeUnpin,
*const ArcInner<dyn TokenStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn TokenStore>>: UnsafeUnpin,
*const ArcInner<dyn Fn() -> ConnectionId + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() -> ConnectionId + Send + Sync>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Version>: UnsafeUnpin,
*const ArcInner<dyn TimeSource> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn TimeSource>>: UnsafeUnpin,
*const ArcInner<Mutex<ManagedEndpoints>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<ManagedEndpoints>>>: UnsafeUnpin,
*const ArcInner<Node> is !null: UnsafeUnpin,
PhantomData<ArcInner<Node>>: UnsafeUnpin,
*const ArcInner<Composite> is !null: UnsafeUnpin,
PhantomData<ArcInner<Composite>>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const dyn ReceiveSocket is !null: UnsafeUnpin,
PhantomData<dyn ReceiveSocket>: UnsafeUnpin,
*const dyn ConnectedDatagrams<Sender = Box<dyn ConnectedDatagramSender>> is !null: UnsafeUnpin,
PhantomData<dyn ConnectedDatagrams<Sender = Box<dyn ConnectedDatagramSender>>>: UnsafeUnpin,
*const dyn DatagramSender is !null: UnsafeUnpin,
PhantomData<dyn DatagramSender>: UnsafeUnpin,
*const dyn ConnectedDatagramSender is !null: UnsafeUnpin,
PhantomData<dyn ConnectedDatagramSender>: UnsafeUnpin,
PhantomData<(Transmit, Box<[u8]>)>: UnsafeUnpin,
*const ArcInner<Node> is !null: UnsafeUnpin,
PhantomData<ArcInner<Node>>: UnsafeUnpin,
*const ArcInner<Semaphore> is !null: UnsafeUnpin,
PhantomData<ArcInner<Semaphore>>: UnsafeUnpin,
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> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
impl<T> ForwardedClientExt for Twhere
T: ExtensionsRef + ?Sized,
§fn trusted_forwarded(&self) -> Option<&Forwarded>
fn trusted_forwarded(&self) -> Option<&Forwarded>
§fn forwarded_client(&self) -> Option<&ForwardedElement>
fn forwarded_client(&self) -> Option<&ForwardedElement>
§fn forwarded_client_ip(&self) -> Option<IpAddr>
fn forwarded_client_ip(&self) -> Option<IpAddr>
for node.§fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
for node.§fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
§fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
§fn forwarded_client_version(&self) -> Option<ForwardedVersion>
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
§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