Struct haproxy_api::Channel

source ·
pub struct Channel<'lua> { /* private fields */ }
Expand description

The “Channel” class contains all functions to manipulate channels.

Please refer to HAProxy documentation to get more information.

Implementations

Copies the string string at the end of incoming data of the channel buffer. Returns the copied length on success or -1 if data cannot be copied.

Returns length bytes of incoming data from the channel buffer, starting at the offset. The data are not removed from the buffer.

Forwards length bytes of data from the channel buffer. Returns the amount of data forwarded and must not be called from an action to avoid yielding.

Returns the length of incoming data in the channel buffer.

Copies the data at the offset in incoming data of the channel buffer. Returns the copied length on success or -1 if data cannot be copied.

By default, if no offset is provided, the string is copied in front of incoming data. A positive offset is relative to the beginning of incoming data of the channel buffer while negative offset is relative to their end.

Returns true if the channel buffer is full.

Returns true if the channel is the response one.

Parses length bytes of incoming data of the channel buffer, starting at offset, and returns the first line found, including the \n.

The data are not removed from the buffer. If no line is found, all data are returned.

Returns true if the channel may still receive data.

Returns the length of outgoing data of the channel buffer.

Copies the data in front of incoming data of the channel buffer. Returns the copied length on success or -1 if data cannot be copied.

Removes length bytes of incoming data of the channel buffer, starting at offset. Returns number of bytes removed on success.

Requires immediate send of the data. It means the data is copied at the beginning of incoming data of the channel buffer and immediately forwarded.

Replaces length bytes of incoming data of the channel buffer, starting at offset, by the new data. Returns the copied length on success or -1 if data cannot be copied.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Performs the conversion.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Performs the conversion. Read more

Calls U::from(self).

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

Performs the conversion.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.