pub struct RpcRequestPacketRx {
pub payload_request_kind: PayloadRequestKind,
pub pow_sponsor_id: Id,
pub pow_server_known: bool,
pub pow: Pow,
pub pow_timestamp: TimeMillis,
pub pow_content_hash: Hash,
pub pow_salt: Salt,
pub bytes: Bytes,
}Expand description
The server-side view of an inbound RPC request after header parsing and PoW verification.
RpcRequestPacketRx is what falls out of decode on the receiving end. It exposes the
routing discriminator (PayloadRequestKind) so the dispatcher knows which handler to
invoke, plus all the PoW fields needed to decide how much trust to assign to the call.
The bytes field still contains the compressed payload — payload decoding happens later,
after the dispatcher has picked the right handler.
Paired with RpcRequestPacketTx as the decode side of the same wire format.
Fields§
§payload_request_kind: PayloadRequestKind§pow_sponsor_id: Id§pow_server_known: bool§pow: Pow§pow_timestamp: TimeMillis§pow_content_hash: Hash§pow_salt: Salt§bytes: BytesImplementations§
Source§impl RpcRequestPacketRx
impl RpcRequestPacketRx
pub fn decode( current_time_millis: &TimeMillis, verification_key_bytes: &VerificationKeyBytes, pq_commitment_bytes: &PQCommitmentBytes, response_bytes: Bytes, ) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RpcRequestPacketRx
impl RefUnwindSafe for RpcRequestPacketRx
impl Send for RpcRequestPacketRx
impl Sync for RpcRequestPacketRx
impl Unpin for RpcRequestPacketRx
impl UnsafeUnpin for RpcRequestPacketRx
impl UnwindSafe for RpcRequestPacketRx
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more