pub trait TopicQuery:
Clone
+ Debug
+ Eq
+ Hash
+ Send
+ Sync
+ Serialize
+ for<'a> Deserialize<'a> { }Expand description
Identify the particular dataset a peer is interested in syncing.
Exactly how this is expressed is left up to the user to decide. During sync the “initiator” sends their topic query to a remote peer where it is be mapped to their local dataset. Additional access-control checks can be performed. Once this “handshake” is complete both peers will proceed with the designated sync protocol.
§TopicId vs TopicQuery
While TopicId is merely a 32-byte identifier which can’t hold much information other than
being a distinct identifier of a single data item or collection of them, we can use TopicQuery to
implement custom data types representing “queries” for very specific data items. Peers can for
example announce that they’d like “all events from the 27th of September 23 until today” with
TopicQuery.
Consult the TopicId documentation in p2panda-net for more information.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.