Skip to content

Commit

Permalink
unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Apr 1, 2024
1 parent 71e7ebf commit 7d02e04
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 550 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion zenoh/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ pub mod queryable;
pub mod sample;
mod scouting;
pub mod selector;
mod subscriber;
pub mod subscriber;
mod time;
pub mod value;
2 changes: 1 addition & 1 deletion zenoh/src/api/key_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use std::{
str::FromStr,
};
use zenoh_core::{AsyncResolve, Resolvable, SyncResolve};
use zenoh_keyexpr::{keyexpr, OwnedKemtExpr};
use zenoh_keyexpr::{keyexpr, OwnedKeyExpr};
use zenoh_protocol::{
core::{key_expr::canon::Canonizable, ExprId, WireExpr},
network::{declare, DeclareBody, Mapping, UndeclareKeyExpr},
Expand Down
31 changes: 11 additions & 20 deletions zenoh/src/api/publication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@
//

//! Publishing primitives.
<<<<<<< HEAD:zenoh/src/api/publication.rs
=======
use crate::net::primitives::Primitives;
use crate::prelude::*;
>>>>>>> sample_api_rework:zenoh/src/publication.rs
#[zenoh_macros::unstable]
use crate::api::sample::attachment::Attachment;
#[zenoh_macros::unstable]
use crate::api::sample::SourceInfo;
use crate::api::{
encoding::Encoding,
handlers::{locked, Callback, DefaultHandler, IntoHandler},
handlers::locked,
handlers::DefaultHandler,
key_expr::{KeyExpr, KeyExprInner},
payload::Payload,
sample::{
Expand All @@ -33,24 +29,18 @@ use crate::api::{
},
session::{SessionRef, Undeclarable},
value::Value,
Id,
};
use crate::net::primitives::Primitives;
use std::future::Ready;
use zenoh_core::{zread, AsyncResolve, Resolvable, Resolve, SyncResolve};
use zenoh_core::{zread, AsyncResolve, Resolvable, Resolve, Result as ZResult, SyncResolve};
use zenoh_keyexpr::keyexpr;
use zenoh_protocol::core::EntityGlobalId;
use zenoh_protocol::core::EntityId;
use zenoh_protocol::network::push::ext;
use zenoh_protocol::network::Mapping;
use zenoh_protocol::network::Push;
use zenoh_protocol::zenoh::Del;
use zenoh_protocol::zenoh::PushBody;
use zenoh_protocol::zenoh::Put;
use zenoh_result::ZResult;

/// The kind of congestion control.
pub use zenoh_protocol::core::CongestionControl;
use zenoh_protocol::{
core::CongestionControl,
network::Mapping,
zenoh::{Del, Put},
};
use zenoh_protocol::{core::EntityGlobalId, network::Push};
use zenoh_protocol::{network::push::ext, zenoh::PushBody};

#[derive(Debug, Clone)]
pub struct PublicationBuilderPut {
Expand Down Expand Up @@ -246,6 +236,7 @@ use std::convert::TryFrom;
use std::convert::TryInto;
use std::pin::Pin;
use std::task::{Context, Poll};
use zenoh_protocol::core::EntityId;
use zenoh_result::Error;

#[zenoh_macros::unstable]
Expand Down
5 changes: 0 additions & 5 deletions zenoh/src/api/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
//

//! Query primitives.
<<<<<<< HEAD:zenoh/src/api/query.rs
=======
use crate::handlers::{locked, Callback, DefaultHandler};
use crate::prelude::*;
>>>>>>> sample_api_rework:zenoh/src/query.rs
#[zenoh_macros::unstable]
use crate::api::sample::SourceInfo;
use crate::api::{
Expand Down
27 changes: 7 additions & 20 deletions zenoh/src/api/queryable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//

//! Queryable primitives.
<<<<<<< HEAD:zenoh/src/api/queryable.rs
#[zenoh_macros::unstable]
use crate::api::query::ReplyKeyExpr;
#[zenoh_macros::unstable]
Expand All @@ -27,8 +26,8 @@ use crate::api::{
sample::{
attachment::Attachment,
builder::{
DeleteSampleBuilder, PutSampleBuilder, QoSBuilderTrait, SampleBuilder,
SampleBuilderTrait, TimestampBuilderTrait, ValueBuilderTrait,
QoSBuilderTrait, SampleBuilder, SampleBuilderTrait, TimestampBuilderTrait,
ValueBuilderTrait,
},
Locality, Sample, SampleKind,
},
Expand All @@ -38,20 +37,6 @@ use crate::api::{
Id,
};
use crate::net::primitives::Primitives;
=======

use crate::encoding::Encoding;
use crate::handlers::{locked, DefaultHandler};
use crate::net::primitives::Primitives;
use crate::prelude::*;
use crate::sample::builder::SampleBuilder;
use crate::sample::{QoSBuilder, SourceInfo};
use crate::Id;
use crate::SessionRef;
use crate::Undeclarable;
#[cfg(feature = "unstable")]
use crate::{query::ReplyKeyExpr, sample::Attachment};
>>>>>>> sample_api_rework:zenoh/src/queryable.rs
use std::fmt;
use std::future::Ready;
use std::ops::Deref;
Expand All @@ -68,7 +53,7 @@ use zenoh_protocol::{
};
use zenoh_result::ZResult;

use super::query::_REPLY_KEY_EXPR_ANY_SEL_PARAM;
use super::{query::_REPLY_KEY_EXPR_ANY_SEL_PARAM, sample::QoSBuilder};

pub(crate) struct QueryInner {
/// The key expression of this Query.
Expand Down Expand Up @@ -176,6 +161,7 @@ impl Query {
encoding: Encoding::default(),
},
timestamp: None,
#[cfg(feature = "unstable")]
source_info: SourceInfo::empty(),
attachment: None,
}
Expand Down Expand Up @@ -214,6 +200,7 @@ impl Query {
qos: response::ext::QoSType::RESPONSE.into(),
kind: ReplyBuilderDelete,
timestamp: None,
#[cfg(feature = "unstable")]
source_info: SourceInfo::empty(),
attachment: None,
}
Expand Down Expand Up @@ -283,8 +270,8 @@ impl AsyncResolve for ReplySample<'_> {

#[derive(Debug)]
pub struct ReplyBuilderPut {
payload: super::Payload,
encoding: super::Encoding,
payload: Payload,
encoding: Encoding,
}
#[derive(Debug)]
pub struct ReplyBuilderDelete;
Expand Down
Loading

0 comments on commit 7d02e04

Please sign in to comment.