Struct jsonrpsee_core::server::helpers::BatchResponse
source · pub struct BatchResponse {
pub result: String,
pub success: bool,
}
Available on crate feature
server
only.Expand description
Response to a batch request.
Fields§
§result: String
Formatted JSON-RPC response.
success: bool
Indicates whether the call was successful or not.
Implementations§
source§impl BatchResponse
impl BatchResponse
sourcepub fn error(id: Id<'_>, err: impl Into<ErrorObject<'static>>) -> Self
pub fn error(id: Id<'_>, err: impl Into<ErrorObject<'static>>) -> Self
Create a BatchResponse
from an error.
Trait Implementations§
source§impl Clone for BatchResponse
impl Clone for BatchResponse
source§fn clone(&self) -> BatchResponse
fn clone(&self) -> BatchResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BatchResponse
impl RefUnwindSafe for BatchResponse
impl Send for BatchResponse
impl Sync for BatchResponse
impl Unpin for BatchResponse
impl UnwindSafe for BatchResponse
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)