pub struct QueryForTopoInfoSend {
pub did: Did,
pub then: QueryFor,
pub request_id: Uuid,
}Expand description
Request one topology snapshot from a specific node.
Reports are accepted only when request_id matches an in-flight DHT request
for the peer that produced the report.
Fields§
§did: DidPeer whose topology state is being queried.
then: QueryForHandler path that will consume the response.
request_id: UuidOne-shot identity that binds the response to this exact query attempt.
The report must echo it unchanged. The receiver also checks the authenticated reporter, so knowing this UUID alone does not authorize a topology mutation or connection effect.
Implementations§
Source§impl QueryForTopoInfoSend
impl QueryForTopoInfoSend
Sourcepub fn new_for_sync(did: Did) -> QueryForTopoInfoSend
pub fn new_for_sync(did: Did) -> QueryForTopoInfoSend
Create a successor-sync query with a fresh correlation id.
Sourcepub fn new_for_sync_with_id(did: Did, request_id: Uuid) -> QueryForTopoInfoSend
pub fn new_for_sync_with_id(did: Did, request_id: Uuid) -> QueryForTopoInfoSend
Create a successor-sync query with a caller-supplied correlation id.
Sourcepub fn new_for_stab(did: Did, request_id: Uuid) -> QueryForTopoInfoSend
pub fn new_for_stab(did: Did, request_id: Uuid) -> QueryForTopoInfoSend
Create a stabilization query for an already-registered request id.
The caller supplies request_id because the DHT must register the
stabilization before the query is sent. The constructor preserves that
token verbatim and labels the response for the stabilization handler; it
performs no registration or transport effect itself.
Sourcepub fn resp(&self, info: TopoInfo) -> QueryForTopoInfoReport
pub fn resp(&self, info: TopoInfo) -> QueryForTopoInfoReport
Build the report that answers this query and preserves its correlation id.
Trait Implementations§
Source§impl Clone for QueryForTopoInfoSend
impl Clone for QueryForTopoInfoSend
Source§fn clone(&self) -> QueryForTopoInfoSend
fn clone(&self) -> QueryForTopoInfoSend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for QueryForTopoInfoSend
Source§impl Debug for QueryForTopoInfoSend
impl Debug for QueryForTopoInfoSend
Source§impl<'de> Deserialize<'de> for QueryForTopoInfoSend
impl<'de> Deserialize<'de> for QueryForTopoInfoSend
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<QueryForTopoInfoSend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<QueryForTopoInfoSend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl HandleMsg<QueryForTopoInfoSend> for MessageHandler
QueryForTopoInfoSend is direct message
impl HandleMsg<QueryForTopoInfoSend> for MessageHandler
QueryForTopoInfoSend is direct message
Source§fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 QueryForTopoInfoSend,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MessageHandler: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 QueryForTopoInfoSend,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MessageHandler: 'async_trait,
Source§impl Serialize for QueryForTopoInfoSend
impl Serialize for QueryForTopoInfoSend
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Forget for QueryForTopoInfoSend
impl Freeze for QueryForTopoInfoSend
impl Move for QueryForTopoInfoSend
impl RefUnwindSafe for QueryForTopoInfoSend
impl Send for QueryForTopoInfoSend
impl Sync for QueryForTopoInfoSend
impl Unpin for QueryForTopoInfoSend
impl UnsafeUnpin for QueryForTopoInfoSend
impl UnwindSafe for QueryForTopoInfoSend
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.