pub enum MaybeBatchedRequests<'a, P> {
Single(Request<'a, P>),
Batch(Vec<Request<'a, P>>),
}
Expand description
Represents either one, or multiple JSON-RPC Request
s.
Note that this type is only really useful for deserializing requests, using the
UnknownParams
type as the parameter type.
Variants§
Trait Implementations§
Source§impl<'a, P: Clone> Clone for MaybeBatchedRequests<'a, P>
impl<'a, P: Clone> Clone for MaybeBatchedRequests<'a, P>
Source§fn clone(&self) -> MaybeBatchedRequests<'a, P>
fn clone(&self) -> MaybeBatchedRequests<'a, P>
Returns a duplicate 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<'a, P: Debug> Debug for MaybeBatchedRequests<'a, P>
impl<'a, P: Debug> Debug for MaybeBatchedRequests<'a, P>
Source§impl<'de, 'a, P> Deserialize<'de> for MaybeBatchedRequests<'a, P>where
P: Deserialize<'de>,
'de: 'a,
impl<'de, 'a, P> Deserialize<'de> for MaybeBatchedRequests<'a, P>where
P: Deserialize<'de>,
'de: 'a,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a, P> Freeze for MaybeBatchedRequests<'a, P>where
P: Freeze,
impl<'a, P> RefUnwindSafe for MaybeBatchedRequests<'a, P>where
P: RefUnwindSafe,
impl<'a, P> Send for MaybeBatchedRequests<'a, P>where
P: Send,
impl<'a, P> Sync for MaybeBatchedRequests<'a, P>where
P: Sync,
impl<'a, P> Unpin for MaybeBatchedRequests<'a, P>where
P: Unpin,
impl<'a, P> UnwindSafe for MaybeBatchedRequests<'a, P>where
P: UnwindSafe,
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