Struct jsonrpsee_core::server::helpers::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) -> Self
pub fn new_with_limit(limit: usize) -> Self
Create a new batch response builder with limit.
sourcepub fn append(self, response: &MethodResponse) -> Result<Self, BatchResponse>
pub fn append(self, response: &MethodResponse) -> Result<Self, BatchResponse>
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 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