Skip to content

Commit 74fd8e3

Browse files
authored
Merge branch 'main' into client_downlinks_bug
2 parents b5b32d3 + 208c4d9 commit 74fd8e3

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ regex = "1.3.6"
162162
fnv = "1.0.7"
163163
cursive = { default-features = false, version = "0.20" }
164164
duration-str = "0.11.2"
165-
quick-xml = "0.34.0"
165+
quick-xml = "0.35.0"
166166
csv = "1.2"
167167
serde-xml-rs = "0.6"
168168
axum = "0.7.5"

api/swimos_api/src/http/method.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ fn methods() -> &'static HashMap<http::Method, Method> {
6565
m.insert(http::Method::GET, Method::GET);
6666
m.insert(http::Method::HEAD, Method::HEAD);
6767
m.insert(http::Method::POST, Method::POST);
68+
m.insert(http::Method::PUT, Method::PUT);
6869
m.insert(http::Method::DELETE, Method::DELETE);
6970
m.insert(http::Method::CONNECT, Method::CONNECT);
7071
m.insert(http::Method::OPTIONS, Method::OPTIONS);

example_apps/devguide/2_2/example_client/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async fn main() {
3333
//
3434
// This operation may fail if there is a connection issue.
3535
let state_downlink = handle
36-
.value_downlink::<i32>(state_path)
36+
.value_downlink::<usize>(state_path)
3737
.lifecycle(lifecycle)
3838
.downlink_config(DownlinkConfig::default())
3939
.open()

example_apps/devguide/2_3/example_client/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async fn main() {
4040
//
4141
// This operation may fail if there is a connection issue.
4242
let _state_downlink = handle
43-
.value_downlink::<i32>(state_path)
43+
.value_downlink::<usize>(state_path)
4444
.lifecycle(lifecycle)
4545
.downlink_config(DownlinkConfig::default())
4646
.open()

swimos_client/src/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,10 @@ pub struct ValueDownlinkBuilder<'h, L> {
373373

374374
impl<'h, L> ValueDownlinkBuilder<'h, L> {
375375
/// Sets a new lifecycle that to be used.
376-
pub fn lifecycle<NL>(self, lifecycle: NL) -> ValueDownlinkBuilder<'h, NL> {
376+
pub fn lifecycle<NL, T>(self, lifecycle: NL) -> ValueDownlinkBuilder<'h, NL>
377+
where
378+
NL: ValueDownlinkLifecycle<T>,
379+
{
377380
let ValueDownlinkBuilder {
378381
handle,
379382
path,
@@ -495,7 +498,10 @@ pub struct MapDownlinkBuilder<'h, L> {
495498

496499
impl<'h, L> MapDownlinkBuilder<'h, L> {
497500
/// Sets a new lifecycle that to be used.
498-
pub fn lifecycle<NL>(self, lifecycle: NL) -> MapDownlinkBuilder<'h, NL> {
501+
pub fn lifecycle<K, V, NL>(self, lifecycle: NL) -> MapDownlinkBuilder<'h, NL>
502+
where
503+
NL: MapDownlinkLifecycle<K, V>,
504+
{
499505
let MapDownlinkBuilder {
500506
handle,
501507
path,
@@ -617,7 +623,10 @@ pub struct EventDownlinkBuilder<'h, L> {
617623

618624
impl<'h, L> EventDownlinkBuilder<'h, L> {
619625
/// Sets a new lifecycle that to be used.
620-
pub fn lifecycle<NL>(self, lifecycle: NL) -> EventDownlinkBuilder<'h, NL> {
626+
pub fn lifecycle<T, NL>(self, lifecycle: NL) -> EventDownlinkBuilder<'h, NL>
627+
where
628+
NL: EventDownlinkLifecycle<T>,
629+
{
621630
let EventDownlinkBuilder {
622631
handle,
623632
path,

0 commit comments

Comments
 (0)