ex3_ic_agent/agent/
response.rs

1use crate::agent::replica_api::RejectResponse;
2
3/// The response of /api/v2/canister/<effective_canister_id>/read_state with "request_status" request type.
4///
5/// See [the HTTP interface specification](https://smartcontracts.org/docs/interface-spec/index.html#http-call-overview) for more details.
6#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)]
7pub enum RequestStatusResponse {
8    /// The status of the request is unknown.
9    Unknown,
10    /// The request has been received, and will probably get processed.
11    Received,
12    /// The request is currently being processed.
13    Processing,
14    /// The request has been successfully replied to.
15    Replied {
16        /// The reply from the replica.
17        reply: Replied,
18    },
19    /// The request has been rejected.
20    Rejected(RejectResponse),
21    /// The call has been completed, and it has been long enough that the reply/reject data has been purged, but the call has not expired yet.
22    Done,
23}
24
25#[allow(missing_docs)]
26#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)]
27pub enum Replied {
28    CallReplied(Vec<u8>),
29}