Struct solicit::http::priority::SimplePrioritizer [] [src]

pub struct SimplePrioritizer<'a, 'b, State> where State: SessionState + 'a {
    // some fields omitted
}

An implementation of the DataPrioritizer trait that is based on finding the first stream from the given SessionState instance that can send data and returning this chunk.

For all means and purposes, the order of data chunks that the prioritizer returns is undefined and should not be relied on.

Methods

impl<'a, 'b, State> SimplePrioritizer<'a, 'b, State> where State: SessionState + 'a

fn new(state: &'a mut State, buf: &'b mut [u8]) -> SimplePrioritizer<'a, 'b, State>

Creates a new SimplePrioritizer that will use the given state to find stream data that should be sent and use the given buffer to hold the data of the returned chunk.

Trait Implementations

impl<'a, 'b, State> DataPrioritizer for SimplePrioritizer<'a, 'b, State> where State: SessionState + 'a

fn get_next_chunk(&mut self) -> HttpResult<Option<DataChunk>>