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 9.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 End Location is known.”
Section 9.16.3 states the other direction of the same freedom: “The FETCH_OK or REQUEST_ERROR can come at any time relative to object delivery.” 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