Struct jsonrpsee::BatchResponseBuilder
source · pub struct BatchResponseBuilder { /* private fields */ }
Expand description
Builder to build a BatchResponse
.
Implementations§
source§impl BatchResponseBuilder
impl BatchResponseBuilder
sourcepub fn new_with_limit(limit: usize) -> BatchResponseBuilder
pub fn new_with_limit(limit: usize) -> BatchResponseBuilder
Create a new batch response builder with limit.
sourcepub fn append(
&mut self,
response: &MethodResponse,
) -> Result<(), MethodResponse>
pub fn append( &mut self, response: &MethodResponse, ) -> Result<(), MethodResponse>
Append a result from an individual method to the batch response.
Fails if the max limit is exceeded and returns to error response to return early in order to not process method call responses which are thrown away anyway.
sourcepub fn finish(self) -> BatchResponse
pub fn finish(self) -> BatchResponse
Finish the batch response
Trait Implementations§
source§impl Clone for BatchResponseBuilder
impl Clone for BatchResponseBuilder
source§fn clone(&self) -> BatchResponseBuilder
fn clone(&self) -> BatchResponseBuilder
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 moresource§impl Debug for BatchResponseBuilder
impl Debug for BatchResponseBuilder
source§impl Default for BatchResponseBuilder
impl Default for BatchResponseBuilder
source§fn default() -> BatchResponseBuilder
fn default() -> BatchResponseBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchResponseBuilder
impl RefUnwindSafe for BatchResponseBuilder
impl Send for BatchResponseBuilder
impl Sync for BatchResponseBuilder
impl Unpin for BatchResponseBuilder
impl UnwindSafe for BatchResponseBuilder
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
)