rama_haproxy::protocol

Trait PartialResult

Source
pub trait PartialResult {
    // Required method
    fn is_incomplete(&self) -> bool;

    // Provided method
    fn is_complete(&self) -> bool { ... }
}
Expand description

The canonical way to determine when a streamed header should be retried in a streaming context. The protocol states that servers may choose to support partial headers or to close the connection if the header is not present all at once.

Required Methods§

Source

fn is_incomplete(&self) -> bool

Tests whether this Result is incomplete. An action that leads to an incomplete result may have a different result with more bytes. Retrying with the same input will not change the result.

Provided Methods§

Source

fn is_complete(&self) -> bool

Tests whether this Result is successful or whether the error is terminal. A terminal error will not result in a success even with more bytes. Retrying with the same – or more – input will not change the result.

Implementations on Foreign Types§

Source§

impl<T, E: PartialResult> PartialResult for Result<T, E>

Implementors§

Source§

impl PartialResult for HeaderResult<'_>

Source§

impl PartialResult for BinaryParseError

Source§

impl PartialResult for rama_haproxy::protocol::v1::ParseError

Source§

impl PartialResult for rama_haproxy::protocol::v2::ParseError