pub struct DataRequest {
pub req_ptr: u64,
pub chain_id: u64,
pub encoding: Encoding,
pub exclude_mask: u32,
pub delay: u32,
pub ttl: u32,
pub method: HttpMethod,
pub url: String,
pub payload: Option<Value>,
pub request_type: RequestType,
}Expand description
A single pending data request. Deserialised from the JSON status blob emitted by the C core.
Fields§
§req_ptr: u64Opaque pointer to the pending data_request_t in the C core.
Sent back to the core via c4_req_set_response /
c4_req_set_error.
chain_id: u64Chain ID for the request (informational).
encoding: EncodingPayload encoding requested by the core (JSON or SSZ).
exclude_mask: u32Bitmask of node indices that should be skipped when picking a
server (a bit 1 << i marks endpoint i as excluded, e.g.
after a previous failure).
delay: u32Optional delay in milliseconds before executing the request (used by oblivious-node retry backoff).
ttl: u32Optional TTL hint in seconds (Cache-Control: max-age=<ttl>).
method: HttpMethodHTTP method.
url: StringURL path (may be empty for POST-only endpoints).
payload: Option<Value>Structured payload for JSON-RPC requests.
request_type: RequestTypeEndpoint kind.
Trait Implementations§
Source§impl Clone for DataRequest
impl Clone for DataRequest
Source§fn clone(&self) -> DataRequest
fn clone(&self) -> DataRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataRequest
impl Debug for DataRequest
Source§impl<'de> Deserialize<'de> for DataRequest
impl<'de> Deserialize<'de> for DataRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataRequest
impl RefUnwindSafe for DataRequest
impl Send for DataRequest
impl Sync for DataRequest
impl Unpin for DataRequest
impl UnsafeUnpin for DataRequest
impl UnwindSafe for DataRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more