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: PartialRpcRequestMessage
Implementations§
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 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