pub struct CursorOutcome {
pub status: u16,
pub body: Vec<u8>,
pub content_type: Option<String>,
pub pool_reuse: bool,
}Expand description
The outcome of a cursor passthrough: the upstream status and raw body, forwarded back to the client verbatim.
Fields§
§status: u16The upstream HTTP status.
body: Vec<u8>The raw upstream response body.
content_type: Option<String>The upstream Content-Type, forwarded verbatim so an admin/cursor
passthrough body (e.g. a _cat text/plain) is not mislabeled
application/json. None ⇒ the caller defaults to JSON.
pool_reuse: boolWhether this op rode a reused pooled connection (NFR-P telemetry).
Implementations§
Source§impl CursorOutcome
impl CursorOutcome
Sourcepub fn with_pool_reuse(self, reused: bool) -> Self
pub fn with_pool_reuse(self, reused: bool) -> Self
Records whether the dispatch reused a pooled connection (builder style).
Sourcepub fn with_content_type(self, content_type: Option<String>) -> Self
pub fn with_content_type(self, content_type: Option<String>) -> Self
Carries the upstream Content-Type (builder style).
Trait Implementations§
Source§impl Clone for CursorOutcome
impl Clone for CursorOutcome
Source§fn clone(&self) -> CursorOutcome
fn clone(&self) -> CursorOutcome
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 CursorOutcome
impl Debug for CursorOutcome
impl Eq for CursorOutcome
Source§impl PartialEq for CursorOutcome
impl PartialEq for CursorOutcome
Source§fn eq(&self, other: &CursorOutcome) -> bool
fn eq(&self, other: &CursorOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CursorOutcome
Auto Trait Implementations§
impl Freeze for CursorOutcome
impl RefUnwindSafe for CursorOutcome
impl Send for CursorOutcome
impl Sync for CursorOutcome
impl Unpin for CursorOutcome
impl UnsafeUnpin for CursorOutcome
impl UnwindSafe for CursorOutcome
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
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
Compare self to
key and return true if they are equal.