Struct Batch
pub struct Batch<'a> { /* private fields */ }Expand description
A batch of JSON-RPC requests.
Implementations§
§impl<'a> Batch<'a>
impl<'a> Batch<'a>
pub fn from(
entries: Vec<Result<BatchEntry<'a>, BatchEntryErr<'a>>>,
) -> Batch<'a>
pub fn from( entries: Vec<Result<BatchEntry<'a>, BatchEntryErr<'a>>>, ) -> Batch<'a>
Create a new batch from a vector of batch entries.
pub fn iter(
&self,
) -> impl Iterator<Item = &Result<BatchEntry<'a>, BatchEntryErr<'a>>>
pub fn iter( &self, ) -> impl Iterator<Item = &Result<BatchEntry<'a>, BatchEntryErr<'a>>>
Get an iterator over the batch.
pub fn iter_mut(
&mut self,
) -> impl Iterator<Item = &mut Result<BatchEntry<'a>, BatchEntryErr<'a>>>
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = &mut Result<BatchEntry<'a>, BatchEntryErr<'a>>>
Get a mutable iterator over the batch.
Trait Implementations§
§impl<'a> IntoIterator for Batch<'a>
impl<'a> IntoIterator for Batch<'a>
§type Item = Result<BatchEntry<'a>, BatchEntryErr<'a>>
type Item = Result<BatchEntry<'a>, BatchEntryErr<'a>>
The type of the elements being iterated over.
Auto Trait Implementations§
impl<'a> Freeze for Batch<'a>
impl<'a> RefUnwindSafe for Batch<'a>
impl<'a> Send for Batch<'a>
impl<'a> Sync for Batch<'a>
impl<'a> Unpin for Batch<'a>
impl<'a> UnsafeUnpin for Batch<'a>
impl<'a> UnwindSafe for Batch<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes