pub enum FetchState {
Idle,
Pending,
Receiving,
Unanswered,
Done,
}Expand description
Fetch lifecycle states.
A fetch settles two things and settles them independently: the publisher’s answer, which arrives on the control stream, and the response stream that carries the objects. Section 6.17: “A publisher MAY send Objects in response to a FETCH before the FETCH_OK message is sent, but the FETCH_OK MUST NOT be sent until the latest group and object are known.”
Section 6.7 says what that freedom is for: a relay “MAY start sending objects immediately in response to a FETCH, even if sending the FETCH_OK takes longer because it requires going upstream to populate the latest object.” So the fetch is over when both have settled, in whichever order they settle.
Variants§
Idle
Initial state before any FETCH message is sent.
Pending
FETCH has been sent; the answer is owed and the response stream has not ended.
Receiving
FETCH_OK received; data is being received on the stream.
Unanswered
The response stream has ended and the answer is still owed.
Done
Fetch has ended (error, cancel, FIN, or reset).
Trait Implementations§
Source§impl Clone for FetchState
impl Clone for FetchState
Source§fn clone(&self) -> FetchState
fn clone(&self) -> FetchState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more