Struct zenoh_protocol::network::declare::interest::DeclareInterest
source · pub struct DeclareInterest {
pub id: InterestId,
pub wire_expr: WireExpr<'static>,
pub interest: Interest,
}Expand description
§DeclareInterest message
The DECLARE INTEREST message is sent to request the transmission of existing and future
declarations of a given kind matching a target keyexpr. E.g., a declare interest could be sent to
request the transmisison of all existing subscriptions matching a/*. A FINAL INTEREST is used to
mark the end of the transmission of exisiting matching declarations.
E.g., the DeclareInterest/FinalInterest/UndeclareInterest message flow is the following:
A B
| DECL INTEREST |
|------------------>| -- This is a DeclareInterest e.g. for subscriber declarations/undeclarations.
| |
| DECL SUBSCRIBER |
|<------------------|
| DECL SUBSCRIBER |
|<------------------|
| DECL SUBSCRIBER |
|<------------------|
| |
| FINAL INTEREST |
|<------------------| -- The FinalInterest signals that all known subscribers have been transmitted.
| |
| DECL SUBSCRIBER |
|<------------------| -- This is a new subscriber declaration.
| UNDECL SUBSCRIBER |
|<------------------| -- This is a new subscriber undeclaration.
| |
| ... |
| |
| UNDECL INTEREST |
|------------------>| -- This is an UndeclareInterest to stop receiving subscriber declarations/undeclarations.
| |
The DECLARE INTEREST message structure is defined as follows:
Flags:
- N: Named If N==1 then the key expr has name/suffix
- M: Mapping if M==1 then key expr mapping is the one declared by the sender, else it is the one declared by the receiver
- Z: Extension If Z==1 then at least one extension is present
7 6 5 4 3 2 1 0
+-+-+-+-+-+-+-+-+
|Z|M|N| D_INT |
+---------------+
~ intst_id:z32 ~
+---------------+
~ key_scope:z16 ~
+---------------+
~ key_suffix ~ if N==1 -- <u8;z16>
+---------------+
|A|F|C|X|T|Q|S|K| (*)
+---------------+
~ [decl_exts] ~ if Z==1
+---------------+
(*) - if K==1 then the interest refers to key expressions
- if S==1 then the interest refers to subscribers
- if Q==1 then the interest refers to queryables
- if T==1 then the interest refers to tokens
- if C==1 then the interest refers to the current declarations.
- if F==1 then the interest refers to the future declarations. Note that if F==0 then:
- replies SHOULD NOT be sent after the FinalInterest;
- UndeclareInterest SHOULD NOT be sent after the FinalInterest.
- if A==1 then the replies SHOULD be aggregated
Fields§
§id: InterestId§wire_expr: WireExpr<'static>§interest: InterestTrait Implementations§
source§impl Clone for DeclareInterest
impl Clone for DeclareInterest
source§fn clone(&self) -> DeclareInterest
fn clone(&self) -> DeclareInterest
Returns a copy 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 DeclareInterest
impl Debug for DeclareInterest
source§impl PartialEq for DeclareInterest
impl PartialEq for DeclareInterest
source§fn eq(&self, other: &DeclareInterest) -> bool
fn eq(&self, other: &DeclareInterest) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for DeclareInterest
impl StructuralPartialEq for DeclareInterest
Auto Trait Implementations§
impl Freeze for DeclareInterest
impl RefUnwindSafe for DeclareInterest
impl Send for DeclareInterest
impl Sync for DeclareInterest
impl Unpin for DeclareInterest
impl UnwindSafe for DeclareInterest
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