pub struct RpcRequestPayload {
data: Vec<u8>,
partial: PartialRpcRequestMessage,
}Expand description
Represents the payload of an RPC request. It encapsulates both the serialized and deserialized form of the request. This allows for efficient handling of requests without having to implement deserialization in multiple places.
Fields§
§data: Vec<u8>§partial: PartialRpcRequestMessageImplementations§
Source§impl RpcRequestPayload
impl RpcRequestPayload
pub fn from_slice(data: Vec<u8>) -> Result<Self, Error>
pub fn request_id(&self) -> &str
pub fn request_type(&self) -> &str
pub fn deserialize_full<T>(&self) -> Result<RpcRequestMessage<T>, RpcError>where
T: RpcRequest,
Auto Trait Implementations§
impl Freeze for RpcRequestPayload
impl RefUnwindSafe for RpcRequestPayload
impl Send for RpcRequestPayload
impl Sync for RpcRequestPayload
impl Unpin for RpcRequestPayload
impl UnsafeUnpin for RpcRequestPayload
impl UnwindSafe for RpcRequestPayload
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<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more