#[repr(u16)]pub enum PayloadRequestKind {
Show 16 variants
ErrorV1 = 0,
PingV1 = 1,
BootstrapV1 = 2,
AnnounceV1 = 3,
GetPostBundleV1 = 4,
GetPostBundleFeedbackV1 = 5,
SubmitPostClaimV1 = 6,
SubmitPostCommitV1 = 7,
SubmitPostFeedbackV1 = 8,
HealPostBundleClaimV1 = 9,
HealPostBundleCommitV1 = 10,
HealPostBundleFeedbackV1 = 11,
CachePostBundleV1 = 12,
CachePostBundleFeedbackV1 = 13,
FetchUrlPreviewV1 = 14,
TrendingHashtagsFetchV1 = 15,
}Expand description
The wire-level discriminator for every RPC request the protocol supports.
This u16 value sits in the RPC request header so the server-side dispatcher can route
each incoming [crate::protocol::rpc::RpcRequestPacketRx] to the correct handler
without having to partially decode the payload first. The variants cover the three
main subsystems: peer exchange (PingV1, BootstrapV1, AnnounceV1), posting and
retrieval (GetPostBundleV1, SubmitPostClaimV1, SubmitPostCommitV1, feedback, heal,
cache), and secondary services (FetchUrlPreviewV1, TrendingHashtagsFetchV1).
Every variant has a paired PayloadResponseKind; backwards-compatible additions go at
the end of the enum so existing u16 values do not shift.
Variants§
ErrorV1 = 0
PingV1 = 1
BootstrapV1 = 2
AnnounceV1 = 3
GetPostBundleV1 = 4
GetPostBundleFeedbackV1 = 5
SubmitPostClaimV1 = 6
SubmitPostCommitV1 = 7
SubmitPostFeedbackV1 = 8
HealPostBundleClaimV1 = 9
HealPostBundleCommitV1 = 10
HealPostBundleFeedbackV1 = 11
CachePostBundleV1 = 12
CachePostBundleFeedbackV1 = 13
FetchUrlPreviewV1 = 14
Implementations§
Trait Implementations§
Source§impl Clone for PayloadRequestKind
impl Clone for PayloadRequestKind
Source§fn clone(&self) -> PayloadRequestKind
fn clone(&self) -> PayloadRequestKind
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 Debug for PayloadRequestKind
impl Debug for PayloadRequestKind
Source§impl Display for PayloadRequestKind
impl Display for PayloadRequestKind
Source§impl PartialEq for PayloadRequestKind
impl PartialEq for PayloadRequestKind
impl StructuralPartialEq for PayloadRequestKind
Auto Trait Implementations§
impl Freeze for PayloadRequestKind
impl RefUnwindSafe for PayloadRequestKind
impl Send for PayloadRequestKind
impl Sync for PayloadRequestKind
impl Unpin for PayloadRequestKind
impl UnsafeUnpin for PayloadRequestKind
impl UnwindSafe for PayloadRequestKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.