pub struct JsonRpcResponseAdmission { /* private fields */ }Expand description
One strictly admitted JSON-RPC response paired with the exact source JSON of its result member.
raw_result is absent for an error response and present even when a success
result is the explicit JSON value null. It is retained only for local
method-specific result decoding; the public JsonRpcResponse remains
unchanged and existing typed transport APIs keep their established shape.
Implementations§
Source§impl JsonRpcResponseAdmission
impl JsonRpcResponseAdmission
Sourcepub const fn response(&self) -> &JsonRpcResponse
pub const fn response(&self) -> &JsonRpcResponse
Returns the ordinary typed response.
Sourcepub fn raw_result(&self) -> Option<&str>
pub fn raw_result(&self) -> Option<&str>
Returns the exact result-member source JSON, including member order and number lexemes, when the response is successful.
Sourcepub fn into_parts(self) -> (JsonRpcResponse, Option<String>)
pub fn into_parts(self) -> (JsonRpcResponse, Option<String>)
Splits this admission into its typed response and exact result source.
Trait Implementations§
Source§impl Clone for JsonRpcResponseAdmission
impl Clone for JsonRpcResponseAdmission
Source§fn clone(&self) -> JsonRpcResponseAdmission
fn clone(&self) -> JsonRpcResponseAdmission
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 JsonRpcResponseAdmission
impl Debug for JsonRpcResponseAdmission
Source§impl PartialEq for JsonRpcResponseAdmission
impl PartialEq for JsonRpcResponseAdmission
impl StructuralPartialEq for JsonRpcResponseAdmission
Auto Trait Implementations§
impl Freeze for JsonRpcResponseAdmission
impl RefUnwindSafe for JsonRpcResponseAdmission
impl Send for JsonRpcResponseAdmission
impl Sync for JsonRpcResponseAdmission
impl Unpin for JsonRpcResponseAdmission
impl UnsafeUnpin for JsonRpcResponseAdmission
impl UnwindSafe for JsonRpcResponseAdmission
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).