Enum jsonrpc_v2::RequestKind
source · pub enum RequestKind {
RequestObject(RequestObject),
ManyRequestObjects(Vec<RequestObject>),
Bytes(Bytes),
}
Expand description
An enum to contain the different kinds of possible requests: using the provided
RequestObject
, an array of RequestObject
s, or raw bytes.
Typically not use directly, Server::handle
can take the individual variants
Variants§
Trait Implementations§
source§impl<'a> From<&'a [u8]> for RequestKind
impl<'a> From<&'a [u8]> for RequestKind
source§impl From<Bytes> for RequestKind
impl From<Bytes> for RequestKind
source§impl From<RequestObject> for RequestKind
impl From<RequestObject> for RequestKind
source§fn from(t: RequestObject) -> Self
fn from(t: RequestObject) -> Self
Converts to this type from the input type.
source§impl From<Vec<RequestObject, Global>> for RequestKind
impl From<Vec<RequestObject, Global>> for RequestKind
source§fn from(t: Vec<RequestObject>) -> Self
fn from(t: Vec<RequestObject>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for RequestKind
impl Send for RequestKind
impl Sync for RequestKind
impl Unpin for RequestKind
impl UnwindSafe for RequestKind
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