Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare message can be Push/Request/RequestContinuous/Response 3 #908

Merged
merged 11 commits into from
Apr 5, 2024
34 changes: 0 additions & 34 deletions commons/zenoh-protocol/src/network/declare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,38 +1029,4 @@ pub mod interest {
Self { options }
}
}

/// ```text
/// Flags:
/// - X: Reserved
/// - X: Reserved
/// - Z: Extension If Z==1 then at least one extension is present
///
/// 7 6 5 4 3 2 1 0
/// +-+-+-+-+-+-+-+-+
/// |Z|X|X| U_INT |
/// +---------------+
/// ~ intst_id:z32 ~
/// +---------------+
/// ~ [decl_exts] ~ if Z==1
/// +---------------+
/// ```
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct UndeclareInterest {
pub id: InterestId,
pub ext_wire_expr: common::ext::WireExprType,
}

impl UndeclareInterest {
#[cfg(feature = "test")]
pub fn rand() -> Self {
use rand::Rng;
let mut rng = rand::thread_rng();

let id: InterestId = rng.gen();
let ext_wire_expr = common::ext::WireExprType::rand();

Self { id, ext_wire_expr }
}
}
}
4 changes: 2 additions & 2 deletions commons/zenoh-protocol/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use core::fmt;

pub use declare::{
Declare, DeclareBody, DeclareFinal, DeclareInterest, DeclareKeyExpr, DeclareMode,
DeclareQueryable, DeclareSubscriber, DeclareToken, UndeclareInterest, UndeclareKeyExpr,
UndeclareQueryable, UndeclareSubscriber, UndeclareToken,
DeclareQueryable, DeclareSubscriber, DeclareToken, UndeclareKeyExpr, UndeclareQueryable,
UndeclareSubscriber, UndeclareToken,
};
pub use oam::Oam;
pub use push::Push;
Expand Down
Loading