Skip to main content

FrontRustls

Struct FrontRustls 

Source
pub struct FrontRustls {
    pub stream: TcpStream,
    pub session: ServerConnection,
    pub peer_disconnected: bool,
    pub peer_reset: bool,
    pub session_ulid: Ulid,
}

Fields§

§stream: TcpStream§session: ServerConnection§peer_disconnected: bool

Peer sent a graceful FIN on the read side (read() returned Ok(0)). We can no longer receive plaintext, but may still have rustls-buffered records to flush on the write side — do NOT abort pending writes.

§peer_reset: bool

Peer reset the connection (RST/ConnectionAborted/BrokenPipe). The TCP channel is dead; further writes are pointless and should short-circuit.

§session_ulid: Ulid

Connection/session ULID propagated from the enclosing mux session. Rendered into SOCKET-layer error logs via Self::session_ulid.

Trait Implementations§

Source§

impl Debug for FrontRustls

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SocketHandler for FrontRustls

Source§

fn socket_write(&mut self, buf: &[u8]) -> (usize, SocketResult)

Keep these two functions structurally symmetric — a divergence caused the 4.5 MB H2 truncation bug. Tests e2e::tests::h2_correctness_tests::* and e2e::tests::h2_tests::test_h2_large_* are the regression guard.

Source§

fn socket_write_vectored( &mut self, bufs: &[IoSlice<'_>], ) -> (usize, SocketResult)

Write a list of plaintext slices through the rustls session.

Empty-buffer invariant: callers may legitimately pass bufs.is_empty() or an all-empty slice to request a pure flush pass. In that case total_len == 0, the top-of-loop buffered_size == total_len guard fires immediately after write_tls drains any pending TLS records the session still has buffered (e.g. the remainder of a record split by the previous call, or close_notify output). This mirrors Self::socket_write: both entry points must stay structurally symmetric so that a zero-byte flush never early-returns without giving rustls a chance to emit bytes.

Keep these two functions structurally symmetric — a divergence caused the 4.5 MB H2 truncation bug. Tests e2e::tests::h2_correctness_tests::* and e2e::tests::h2_tests::test_h2_large_* are the regression guard.

Source§

fn socket_read(&mut self, buf: &mut [u8]) -> (usize, SocketResult)

Source§

fn socket_close(&mut self)

Source§

fn socket_wants_write(&self) -> bool

Source§

fn socket_ref(&self) -> &TcpStream

Source§

fn socket_mut(&mut self) -> &mut TcpStream

Source§

fn protocol(&self) -> TransportProtocol

Source§

fn read_error(&self)

Source§

fn write_error(&self)

Source§

fn session_ulid(&self) -> Option<Ulid>

Returns the owning connection’s session ULID when known. Used by [log_socket_context!] to render the [<session_ulid> - - -] segment of the socket-layer log prefix, matching the format used by the rest of the mux stack. Returns None for contextless implementations (e.g. raw mio::TcpStream); the macro renders - in the ULID slot.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more