[][src]Struct sozu_lib::protocol::proxy_protocol::relay::RelayProxyProtocol

pub struct RelayProxyProtocol<Front: SocketHandler> {
    pub header_size: Option<usize>,
    pub frontend: Front,
    pub request_id: Hyphenated,
    pub backend: Option<TcpStream>,
    pub frontend_token: Token,
    pub backend_token: Option<Token>,
    pub front_buf: Checkout<Buffer>,
    pub front_readiness: Readiness,
    pub back_readiness: Readiness,
    // some fields omitted
}

Fields

header_size: Option<usize>frontend: Frontrequest_id: Hyphenatedbackend: Option<TcpStream>frontend_token: Tokenbackend_token: Option<Token>front_buf: Checkout<Buffer>front_readiness: Readinessback_readiness: Readiness

Implementations

impl<Front: SocketHandler + Read> RelayProxyProtocol<Front>[src]

pub fn new(
    frontend: Front,
    frontend_token: Token,
    request_id: Hyphenated,
    backend: Option<TcpStream>,
    front_buf: Checkout<Buffer>
) -> Self
[src]

pub fn readable(&mut self, metrics: &mut SessionMetrics) -> SessionResult[src]

pub fn back_writable(
    &mut self,
    metrics: &mut SessionMetrics
) -> (ProtocolResult, SessionResult)
[src]

pub fn front_socket(&self) -> &TcpStream[src]

pub fn back_socket(&self) -> Option<&TcpStream>[src]

pub fn back_socket_mut(&mut self) -> Option<&mut TcpStream>[src]

pub fn set_back_socket(&mut self, socket: TcpStream)[src]

pub fn back_token(&self) -> Option<Token>[src]

pub fn set_back_token(&mut self, token: Token)[src]

pub fn front_readiness(&mut self) -> &mut Readiness[src]

pub fn back_readiness(&mut self) -> &mut Readiness[src]

pub fn into_pipe(self, back_buf: Checkout<Buffer>) -> Pipe<Front>[src]

Auto Trait Implementations

impl<Front> !RefUnwindSafe for RelayProxyProtocol<Front>

impl<Front> Send for RelayProxyProtocol<Front> where
    Front: Send

impl<Front> Sync for RelayProxyProtocol<Front> where
    Front: Sync

impl<Front> Unpin for RelayProxyProtocol<Front> where
    Front: Unpin

impl<Front> !UnwindSafe for RelayProxyProtocol<Front>

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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