pub struct SearchOp {
pub target: Target,
pub body: Vec<u8>,
pub protocol: Protocol,
pub query: Option<String>,
pub trace: Option<TraceContext>,
pub forward_headers: Vec<(String, String)>,
}Expand description
A search operation against a resolved Target.
The body is the already-wrapped query (the tenancy partition filter has
been applied, docs/04 §4); the reader forwards it verbatim.
Fields§
§target: TargetThe physical destination to search.
body: Vec<u8>The query body to forward upstream (already partition-filtered).
protocol: ProtocolThe upstream wire protocol this search is dispatched over. Defaults to
Protocol::Http1.
query: Option<String>An already-allow-listed query string (without the ?) to append to the
upstream URL, e.g. scroll=1m to open a scroll. The engine filters this
to cursor-safe params before it reaches here; the sink appends it verbatim.
trace: Option<TraceContext>The W3C trace context to forward downstream (traceparent).
forward_headers: Vec<(String, String)>Client headers to relay verbatim to the upstream (the forwarding policy’s
output). Applied before trace. Empty by default.
Implementations§
Source§impl SearchOp
impl SearchOp
Sourcepub fn new(target: Target, body: Vec<u8>) -> Self
pub fn new(target: Target, body: Vec<u8>) -> Self
Constructs a search operation (defaulting to HTTP/1.1 upstream).
Sourcepub fn with_protocol(self, protocol: Protocol) -> Self
pub fn with_protocol(self, protocol: Protocol) -> Self
Sets the upstream protocol for this op (builder style).
Sourcepub fn with_query(self, query: Option<String>) -> Self
pub fn with_query(self, query: Option<String>) -> Self
Sets the (already allow-listed) upstream query string (builder style).
Sourcepub fn with_trace(self, trace: Option<TraceContext>) -> Self
pub fn with_trace(self, trace: Option<TraceContext>) -> Self
Sets the trace context to propagate downstream (builder style).
Sourcepub fn with_forward_headers(self, headers: Vec<(String, String)>) -> Self
pub fn with_forward_headers(self, headers: Vec<(String, String)>) -> Self
Sets the client headers to relay verbatim to the upstream (builder style).
Trait Implementations§
impl Eq for SearchOp
impl StructuralPartialEq for SearchOp
Auto Trait Implementations§
impl Freeze for SearchOp
impl RefUnwindSafe for SearchOp
impl Send for SearchOp
impl Sync for SearchOp
impl Unpin for SearchOp
impl UnsafeUnpin for SearchOp
impl UnwindSafe for SearchOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.